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

Accuracy argument is excessive #306

Open
Finesse opened this issue May 7, 2024 · 0 comments
Open

Accuracy argument is excessive #306

Finesse opened this issue May 7, 2024 · 0 comments

Comments

@Finesse
Copy link

Finesse commented May 7, 2024

As I can see, the accuracy argument in all functions ends up being used like this:

return Math.round(distance / accuracy) * accuracy;

It makes no sense to me, because this rounding is not necessary and it can be done outside the library. I thought the accuracy affects the execution time so user has to choose a compromise, but that's false.

The "problem" is it's hard to get the original distance value. This can be done by using accuracy equal Math.pow(2, -52). This is ridiculous.

One solution I see is removing the accuracy argument, but this is a breaking change. Another solution is allowing a new accuracy value like null or 0 that disables the rounding.

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

1 participant