Angus Leeming wrote: > On Thursday 18 April 2002 1:45 pm, Lars Gullik Bjønnes wrote: > >>Herbert Voss <[EMAIL PROTECTED]> writes: >>| Angus Leeming wrote: >> >>>> r = int(factor * double(r)); >>>> g = int(factor * double(g)); >>>> b = int(factor * double(b)); >>>> >>| >>| never divide or multiply with powers of 2! >> >>Hmm why? >> > > You mean use left-shit and right-shift operators? > No; I hate them. It's equivalent to pointer arithmetic and IMO is an > optimisation that's justified only very rarely.
I can't understand why you are using floats for pure hexadecimal operations. You want nothing else than only specific bytes. that's nothing else than shift and logical oprators and it has nothing to do with pointer aritjmetics. shift is one cycle in assembler code ... Herbert -- http://www.lyx.org/help/