**Mail Archives: djgpp/1997/05/14/01:59:34**
I was just messing around some more with a little program I made to test
out Allegro, and I noticed in Allegro.txt it says (pertaining to fixed
point numbers & angles):
"Angles are represented in a binary format with 256 equal to a full
circle,
64 being a right angle and so on. This has the advantage that a simple
bitwise 'and' can be used to keep the angle within the range zero to a
full
circle, eliminating all those tiresome 'if (angle >= 360)' checks."
Call me stupid, but how exactly would I implement a bitwise and to get it
to do that (in such a way that it would be more practical than the above
check)?
======
Ben Shadwick, Sysop, Mars Base BBS (360)882-0773, Vancouver, WA, USA
email: bshadwick AT juno DOT com >>> NO SPAMMING -- VIOLATORS WILL BE
PROSECUTED! <<<
"I am now telling the computer EXACTLY what it can do with a lifetime
supply of chocolate!!!"

*- Raw text -*