Home Technical Talk
The BRAWL² Tournament Challenge has been announced!

It starts May 12, and ends Sept 12. Let's see what you got!

https://polycount.com/discussion/237047/the-brawl²-tournament

[MAXScript] Checking if variable is integer or float

polycounter lvl 14
Offline / Send Message
Wesley polycounter lvl 14
Hey, stuck on something really simple here. I've got a simple line of code:
  1. if classOf (variable01 - variable02) == integer then
  2. (
  3. print integer
  4. )
  5. else
  6. (
  7. print float
  8. )

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.