ID:2021561
 
(See the best response by Ter13.)
Code:
there a correct way to compare floats in DM script? Using the == operator usually ends in rounding


Problem description:

Best response
Usually you want to use comparison and absolute values to get an approximation within a certain range.

if(abs(float1-float2)<0.01)


The above test would be true if the values are approximately equal within an error of one one hundredth.