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

Displacement#distance: Use a naive hypot impl #6761

Merged
merged 1 commit into from
Nov 2, 2023

Conversation

glebm
Copy link
Collaborator

@glebm glebm commented Nov 1, 2023

std::hypot is much slower than a naive implementation. It has the advantage of extra precision but we don't need that at all.

Conveniently, this also works around the nxdk issue. We can also cherry-pick this for 1.5.

`std::hypot` is much slower than a naive implementation.
It has the advantage of extra precision but we don't need that at all.
@glebm glebm enabled auto-merge (rebase) November 2, 2023 00:12
@glebm glebm merged commit 026907e into diasurgical:master Nov 2, 2023
@StephenCWills
Copy link
Member

Wonder if we should add an assert...

@glebm glebm deleted the naive-magnitude branch November 2, 2023 02:02
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.

3 participants