Listen to a special audio message from Bill Roper to the Hive Workshop community (Bill is a former Vice President of Blizzard Entertainment, Producer, Designer, Musician, Voice Actor) 🔗Click here to hear his message!
You're not really determining whether or not the value is an integer, rather whether a real number is a whole number. If there was a modulus operation then it would be even cooler:
Code:
if (yourNumber % 1 == 0) {
// "yourNumber" is a whole number.
}
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.