Game Maker Games, Articles, Tutorials & More

Game Maker Network


Howdy, Guest! Please sign in or register an account.

Print

is_odd

By Daniel · January 6, 2009

Returns whether some number is in the set of odd numbers: {.., -3, -1, 1, 3, ..}

// is_odd(n)
return (abs(argument0) mod 2 == 1);

Categories: Mathematics

Comments

There are no comments to display.

Post a Comment

You must be signed in to post comments.

Advertisement