Open pegasus45 opened 7 years ago
@pegasus45 nice catch! The problem is that 2.70%0.05
evaluates to the number 2.7755575615628914e-17
(should be 0
btw, but that's a floating point error in JavaScript) that uses scientific notation. And the toFixed
method was actually using scientific notation to avoid these floating point errors, but did not expect an incoming scientific notation.
I updated the method in #165 and this is now fixed, you could copy the code from there until there is a merge.
Hi,
formatNumber(2.70%0.05,2) is returning undefined instead of 0.
could you help to check? This was working in prior release. Thank you.