Skip to content
New issue

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

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

Already on GitHub? # to your account

Should hypot be used for the radial coordinate? #57

Closed
SebastianM-C opened this issue May 10, 2020 · 1 comment · Fixed by #59
Closed

Should hypot be used for the radial coordinate? #57

SebastianM-C opened this issue May 10, 2020 · 1 comment · Fixed by #59

Comments

@SebastianM-C
Copy link
Contributor

I see that the radial coordinate is computed using sqrt(x[1]*x[1] + x[2]*x[2]). This could potentially overflow in some cases. Do you think the use of hypot(x[1],x[2]) would be better? The drawback would be that the code is more complex and thus could be a bit slower.

If you agree with the use of hypot, I can make a PR.

@andyferris
Copy link
Contributor

Yes I think that is a good idea.

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

Successfully merging a pull request may close this issue.

2 participants