plus or minus 10
Posted: Fri Jul 20, 2007 8:54 pm
is their a quick way to test a plus or minus instead of using &&?
a simple example of what I am looking for:
// if player's x position is more then or equal to -10 and less then or equal to 10 then do something.
if (player.x =+- (10))do something;
the longer way I know works:
if (player.x>=-10 && player.x<=10)do something;
a simple example of what I am looking for:
// if player's x position is more then or equal to -10 and less then or equal to 10 then do something.
if (player.x =+- (10))do something;
the longer way I know works:
if (player.x>=-10 && player.x<=10)do something;