Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Accuracy argument is excessive #306

Copy link
Copy link

Description

@Finesse
Issue body actions

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.

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

    Morty Proxy This is a proxified and sanitized view of the page, visit original site.