You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is a consequence of how Number.prototype.toFixed works. The starting number 99999 gets reduced to 99.999, which is round to 100 with toFixed. This does bring up a good point that the rounding logic can be improved, so thanks. Leave it with me and I'll see what I can do.
@Sebastp Truthfully, I forgot about this issue. Given that the solution isn't entirely clear at this stage, it may take longer to fix than you'd like (assuming you need a fix asap). If you want to take a crack at improving it and open a PR, I'd be happy to review. Otherwise, I'd recommend either waiting or looking for a workaround for the time being.
https://codesandbox.io/s/magical-water-f7f84n?file=/src/index.js:0-164
Output:
It should be:
Should it not? Why is it rounding up?
The text was updated successfully, but these errors were encountered: