Notifications
Clear all
[Closed] dividing 1 with 100 is 0 why?
Feb 07, 2012 6:33 pm
I have strange behaviour with maxcsript, when i want divide 1/100 he says that it is 0 do you know whre is the problem?
6 Replies
Feb 07, 2012 6:33 pm
Because you’re using integers so your result will be an integer. Make one of your numbers a float and it will return a float.
1/100
0
1 as float/100
0.01
1/100 as float
0.01
Feb 07, 2012 6:33 pm
That can be an easy thing to forget about.
gotta watch out for the float/integer calculations.
Feb 07, 2012 6:33 pm
That can be an easy thing to forget about.
gotta watch out for the float/integer calculations.
Feb 07, 2012 6:33 pm
That can be an easy thing to forget about.
gotta watch out for the float/integer calculations.