The following code leads my game app to a strange behavior! I tried the same code In some modern languages such as Java C# and here is the JavaScript version!
var x = .3 - .2,
y = .2 - .1,
areEqual= (x == y),
xIsDotOne = x == .1,
yIsDotOne = y== .1;
areEqual
is false, xIsDotOne
is false but yIsDotOne
is true.
So how to let them return the exact value?