Please explain this piece of code: box.vector.x * ((i & 1) != 0 ? -1 : 1)
Posted on 2006-11-21
I know what the piece of code does, and why it does it what I am really after is what:
((i & 1) != 0 ? -1 : 1)
is all about. I know it's a short hand conditional statement, but I'm really not sure at all what it does, or how it should really be used. Any help ay all would be greatly appreciated.