I haven't found the exact standard, but I'm looking for it.
When you add numbers with decimals, JavaScript will add value.
For instance:
115.04 + 15 = 130.04000000000002
Instead of 130.04
So, I found a work around for this. Use *.toPrecision(##).
toPrecision will allows you to truncate the value.
I am using it for something else altogether. I need to truncate a value and then add .5 to it.
ReplyDeleteThis help! Thanks