About Floating Point Numbers in JavaScript
Don't trust the default float
type implementation when working with floating point numbers in JavaScript. For example:
1 2 |
|
Instead, do the calculations by using a library like decimal.js.
1 2 3 |
|
Tips and Tricks Programming