AS: Binary Increasment 2005-06-28 13:54:55
This is going to be pretty short ;)
this is just a simple technique to save you time and make your 'if's look neater
we rely on the fact that a logical 'true' is equal to 1 and a logical 'false' is equal to 0
for example, let's examine the following situation, we have acceliration in a game and we want it to move towerds 0, now our normal solution would have been
now let's count on the fact that the '>' operator is a boolean operator, it's either "true" or "false" which as I already said equals to '1' and '0'
therefor we can write it now as
now let's say we want it to increase by two, all we have to do is
now let's say we want it to increase if they key "down" is pressed
nifty ain't it?