--- In [email protected], "mikejd42" <mikej...@...> wrote: > > --- In [email protected], "John Matthews" <jm5678@> wrote: > > > > newPixel = (pixel1 + pixel2) / 2; > > > instead of the "/2" use " >> 1" its faster with less overhead.
The compiler will generate code that effectively does >>1 to implement the /2 (if it doesn't then time to change compilers). So I would argue that it's better to write it as /2 because logically that's what you want to do.
