Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Number 249.99999999999999 rounds to 250 #292

Open
zgrguric opened this issue Nov 9, 2022 · 3 comments
Open

Number 249.99999999999999 rounds to 250 #292

zgrguric opened this issue Nov 9, 2022 · 3 comments

Comments

@zgrguric
Copy link

zgrguric commented Nov 9, 2022

[ x ] Bug
[ ] Feature request

CountUp.js version: 2.3.2

Description

Number: 249.99999999999999 counting up from 0 to this number round up on last frame to 250.

Suggestion: use BigNumber or last paint use source endval

Can be reproduced in demo.

@inorganik
Copy link
Owner

I verified. Is this an actual use case?

@zgrguric
Copy link
Author

zgrguric commented Nov 9, 2022

In my case I did put callback which will redraw on complete, so not a big issue on my end.

Up to you if you want to implement BigNumberJS or other logic.

@inorganik
Copy link
Owner

PRs welcome! Not sure when I'll get to this

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants