View Single Post
  #8   (View Single Post)  
Old 20th November 2008
nfries88's Avatar
nfries88 nfries88 is offline
Port Guard
 
Join Date: Sep 2008
Posts: 24
Default

In the future, rather than modulo by 2 you should binary and by 1 (afterall a number cannot be odd if the 1 bit is not set). Maybe a good compiler would catch and optimize that anyway, but it's always good to be certain.

But surely, in this case, a sub is even better.
Reply With Quote