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

Error or less-than-ideal-naming on distance functions #18

Open
AndrewLipscomb opened this issue Nov 6, 2019 · 0 comments
Open

Error or less-than-ideal-naming on distance functions #18

AndrewLipscomb opened this issue Nov 6, 2019 · 0 comments

Comments

@AndrewLipscomb
Copy link

public func distanceFrom(_ otherPoint: Self) -> Float {

These appear to be returning a standard Pythagoras result, but the result is not square rooted. AFAIK this is not meant to be the case but I haven't had time to dig (I only know the DP algorithm at a distance).

If this is meant to be a linear distance, it looks like it needs to be square rooted. Else it might help to modify the function names to indicate that this is a squared result - otherwise it looks like a straightforward distance calculation function.

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