Numbers

Stulish

Active Member
Licensed User
Longtime User
Is there a way to test if a float if a whole number for example:

If i have the following then the answer would be true:

isWholeNumber(1.0)
isWholeNumber(13.00)
isWholeNumber(27.000)

and return false if there were any numbers after the decimal place (fractions):

isWholeNumber(1.34)
isWholeNumber(23.456)
isWholeNumber(21.3)

Basically i have a float variable that could return either whole numbers or numbers with fractions and i need a way to check, and help would be appreciated, i expect there is already a function that i do not know about.

Thanks

Stu
 

Stulish

Active Member
Licensed User
Longtime User
Thanks thedesolatesoul,

I knew there would be a command to do this

:sign0060:
 
Upvote 0
Top