toggle menu
Categories
Discussions
Dashboard
Sign In
·
Register
Sign In
·
Register
Categories
Discussions
Dashboard
Sign In
·
Register
×
Home
›
GameSalad 101
›
Working with GS (Mac)
Getting odd number
JamJarRiot
Member
Posts:
62
January 2011
edited November -1
in
Working with GS (Mac)
Ok, I need to know if a number is odd or even. Say I have a random value between 1 and 6, what's the calculation for doing this? I've done it before using Modulo but it escapes me at the moment.
Comments
simo103
Member, PRO
Posts:
1,331
January 2011
if you do the number %2 if it is odd it is 1 if even it is 0
Sign In
or
Register
to comment.
Comments