Scripting Helpers is winding down operations and is now read-only. More info→
Ad
Log in to vote
0

How to fix floating point demystified?

Asked by 5 years ago

I got a code kind of like:

--some code
if 0.18 + 0.02 == 0.2 then
    --some more code
end
--even more code

But I always get false in the if stamens, any idea to fix this?

Answer this question