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

Add Distance Equation in Point Structs #11

Closed
threeal opened this issue Apr 18, 2021 · 0 comments · Fixed by #13
Closed

Add Distance Equation in Point Structs #11

threeal opened this issue Apr 18, 2021 · 0 comments · Fixed by #13
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@threeal
Copy link
Member

threeal commented Apr 18, 2021

Add some distance equations in the Point2 and Point3 structs as follows:

  • A static distance_between(Point, Point) function that calculate distance between two points.
  • A magnitude() function that calculate distance of this point from the center coordinate (0, 0).
  • A normalize() function that return a new normalized point which magnitude is 1.0.
@threeal threeal added the enhancement New feature or request label Apr 18, 2021
@threeal threeal added this to the Version 1.0.0 milestone Apr 18, 2021
@Nathan24zz Nathan24zz self-assigned this Apr 18, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants