edit: damn, i did not read what you posted properly :| If you are mixing floats with integers you always get float as a result. You can always explicit cast the result to a float or an integer.
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…
The problem though is that when calculating two integers that results in a float, like 999 divided by 6, the 166.5 gets rounded to 166. I'm wanting the result to instead either be a integer (when it's an integer obviously) or a float (when it's a float). I should have given this a different title to this.
You can try using ceil or floor :variable01=2variable02=3.2someVariable=variable01 - variable02if ((someVariable - floor someVariable) == 0)then( print integer)else( print float)
Is there then a way to then check if the float has numbers other than 0 after the decimal then... Essentially the user is able to pick any two integers and I need to put a check to make sure they've picked two where one is divisible by the other.