Home Technical Talk

[MAXScript] Checking if variable is integer or float

polycounter lvl 13
Offline / Send Message
Wesley polycounter lvl 13
Hey, stuck on something really simple here. I've got a simple line of code:
if classOf (variable01 - variable02) == integer then
(
     print integer
)
else
(
     print float
)

The problem being that when Max is given two integers it'll always round. If I supply the two variables as floats and it get number.0 then it'll still be a float class.

I must be missing something insanely obvious here, any help would be much appreciated.

Replies

Sign In or Register to comment.