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

fix(modeling): fix line2.closestPoint #1226

Merged
merged 1 commit into from
Apr 8, 2023

Conversation

platypii
Copy link
Contributor

@platypii platypii commented Apr 8, 2023

Fixes #1225

Thanks @achirita for catching that, and for suggesting the fix! I used your suggested fix, but refactored it a bit to avoid allocating intermediate vec2's.

I also added tests for origin and direction and closestPoint which cover this case.

Screenshot at 2023-04-08 12-25-31

All Submissions:

  • Have you followed the guidelines in our Contributing document?
  • Have you checked to ensure there aren't other open Pull Requests for the same update/change?
  • Does your submission pass tests?

@platypii platypii requested a review from z3dev April 8, 2023 19:29
Copy link
Contributor

@hrgdavor hrgdavor left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good !

@z3dev z3dev merged commit 4419fe5 into jscad:master Apr 8, 2023
@platypii platypii deleted the line2-closestPoint branch April 11, 2023 00:21
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.

line2.closestPoint output is wrong
3 participants