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 typo related to intersections at endpoints #21

Conversation

bluenote10
Copy link
Contributor

This PR mainly fixes a small typo in the translation of the JS algorithm to Rust. I already noticed that the Rust algorithm had a small difference compared to the JS on test case issue103. Basically it produced a spurious vertex next to another vertex. Not fully wrong, because it still followed the same shape, but not needed for the result:

image

Tracking down the issue turned out that it is simply a && that should have been || (see JS side here). I have also added a new test case:

image

Comparing the before and after coordinates at this case case, we can see that the spurious vertices around the correct vertices disappear:

image

I've also updated the readme a little bit.

@bluenote10
Copy link
Contributor Author

@untoldwind Can we merge this as well? If you want me to more actively help you with maintaining this library you may give me some slightly extended rights so that I could merge minor changes like this without bothering you, and also to clean up the open issues a little bit, e.g. closing a few solved ones. I don't need/want direct push rights, because I prefer going through PR in general, and I would mainly ping you for more general changes especially if they touch Rust design questions if that's okay for you.

@untoldwind untoldwind merged commit fc3c386 into 21re:master May 5, 2020
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.

None yet

2 participants