This repository was archived by the owner on Nov 4, 2020. It is now read-only.
Add failing tests to try to confirm a suspected bug#1
Merged
Conversation
tidwall
added a commit
that referenced
this pull request
Dec 4, 2016
Owner
|
Hi Drew, Thanks a bunch for finding this bug. Sorry about my broken code. :( Typically a raycast can only help to determine if a point is fully inside a polygon, but I need to also detect if a point is on a segment of a polygon. I made some modification based on your suggested code. It's likely a little slower than the previous, but it should work now. Please test it out on your side and let me know what you think. |
Author
|
Thank you! |
Owner
|
That's great to hear. 👍 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
(Hopefully this is helpful)
I added some tests that I think should pass and some of them end up failing.
I tried to actually fix the issue. I got some test to pass, but I ended up breaking other tests, so I removed my attempt to fix.
My attempt was related to this code I found here: https://rosettacode.org/wiki/Ray-casting_algorithm#Go
I am not very familiar with the algorithm though.
PS, Thanks for the code. Tile38 looks really interesting.