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

fix: fix floating point precision bug #206

Merged
merged 1 commit into from
Nov 23, 2023
Merged

fix: fix floating point precision bug #206

merged 1 commit into from
Nov 23, 2023

Conversation

daydayhappychao
Copy link
Contributor

@daydayhappychao daydayhappychao commented Nov 1, 2023

修复浮点数精确度的问题

image

以上情况表面上是5结尾,但是 toFixed 的时候因为实际值更偏向 4671 结尾所以会舍弃掉最后一位

__tests__/unit/tick-methods/r-pretty.spec.ts Show resolved Hide resolved
src/utils/pretty-number.ts Show resolved Hide resolved
@pearmini pearmini merged commit 9d3b30d into antvis:master Nov 23, 2023
1 check passed
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

Successfully merging this pull request may close these issues.

wilkinson-extended 中加法产生的精度问题
2 participants