|
||
|
GP Mailing List
ATXGPSIG List
|
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] Re: int switch (was: BUT WAIT!)
oops just noticed a few typos...I am sure that you guys would have noticed
and corrected them...but I believe it should be like this instead :P
#define SWITCH( a, b ) { a^=b^=a^=b; }
I forgot the semi-colon and the right bracket was wrong type..oops :P
should work like a charm now plus I believe that 3 XORs is technically
faster than 3 MOVs...is this correct...well anyways you don't need a temp
variable here :)
PrOxY
=================================================================
The GameProgrammer.Com mailing list is for the open discussion
of any topic related to the art, science, and business of
programming games. This list is especially tolerant of beginners.
We were all beginners once
To SUBSCRIBE or UNSUBSCRIBE please visit:
http://gameprogrammer.com/mailinglist.html
|
|