While working on a plugin i noticed a strange thing, if a subtract a number from 0.66 to 0.99 from 1, the result is not correct.
For example. 0.98 - 1 results in -0.020000000000000018, instead of -0,2. This can lead to some math mistakes, for example, if you do Math.abs((0.98 - 1) * 100), the result will be 3 instead of 2 (this was how i ended finding this issue).
This is a minor issue and is easy to solve (just multiply the values before the subtraction, as it seems only to happens with 0.66 to 0.99 - 1), but it is normal or is a bug from the maker?
Those who want to test it, just call console.log(x - 1) where x is a number between 0.66 and 0.99
For example. 0.98 - 1 results in -0.020000000000000018, instead of -0,2. This can lead to some math mistakes, for example, if you do Math.abs((0.98 - 1) * 100), the result will be 3 instead of 2 (this was how i ended finding this issue).
This is a minor issue and is easy to solve (just multiply the values before the subtraction, as it seems only to happens with 0.66 to 0.99 - 1), but it is normal or is a bug from the maker?
Those who want to test it, just call console.log(x - 1) where x is a number between 0.66 and 0.99