{"action":"created","issue":{"url":"https://api.github.com/repos/mikolalysenko/robust-point-in-polygon/issues/1","labels_url":"https://api.github.com/repos/mikolalysenko/robust-point-in-polygon/issues/1/labels{/name}","comments_url":"https://api.github.com/repos/mikolalysenko/robust-point-in-polygon/issues/1/comments","events_url":"https://api.github.com/repos/mikolalysenko/robust-point-in-polygon/issues/1/events","html_url":"https://github.com/mikolalysenko/robust-point-in-polygon/issues/1","id":54821659,"number":1,"title":"Points incorrectly identified as inside certain shapes","user":{"login":"christophermanning","id":289331,"avatar_url":"https://avatars.githubusercontent.com/u/289331?v=3","gravatar_id":"","url":"https://api.github.com/users/christophermanning","html_url":"https://github.com/christophermanning","followers_url":"https://api.github.com/users/christophermanning/followers","following_url":"https://api.github.com/users/christophermanning/following{/other_user}","gists_url":"https://api.github.com/users/christophermanning/gists{/gist_id}","starred_url":"https://api.github.com/users/christophermanning/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/christophermanning/subscriptions","organizations_url":"https://api.github.com/users/christophermanning/orgs","repos_url":"https://api.github.com/users/christophermanning/repos","events_url":"https://api.github.com/users/christophermanning/events{/privacy}","received_events_url":"https://api.github.com/users/christophermanning/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-01-19T22:44:02Z","updated_at":"2015-01-20T02:40:48Z","closed_at":null,"body":"First of all, thank you for writing this helpful piece of software. While trying it out, I noticed it wasn't returning the correct result in certain scenarios. I added these tests to the `test.js` file and they seem to be incorrectly identifying these points as inside the polygon. I tried a few tweaks to the code, but couldn't get it working. Any guidance for fixing this would be very helpful. Thank you.\r\n\r\n```\r\n  // triangle\r\n  t.equals(inside([[1,1],[2,1],[2,2]], [1,2]), 1) // incorrectly returns -1\r\n\r\n  // parallelogram\r\n  t.equals(inside([[1,1],[1,2],[2,3],[2,2]], [1,3]), 1) // incorrectly returns -1\r\n```\r\n\r\nTest output:\r\n```\r\nTAP version 13\r\n# (anonymous)\r\nnot ok 1 should be equal\r\n  ---\r\n    operator: equal\r\n    expected: 1\r\n    actual:   -1\r\n    at: Test.<anonymous> (robust-point-in-polygon/test/test.js:7:5)\r\n  ...\r\nnot ok 2 should be equal\r\n  ---\r\n    operator: equal\r\n    expected: 1\r\n    actual:   -1\r\n    at: Test.<anonymous> (robust-point-in-polygon/test/test.js:10:5)\r\n```"},"comment":{"url":"https://api.github.com/repos/mikolalysenko/robust-point-in-polygon/issues/comments/70595965","html_url":"https://github.com/mikolalysenko/robust-point-in-polygon/issues/1#issuecomment-70595965","issue_url":"https://api.github.com/repos/mikolalysenko/robust-point-in-polygon/issues/1","id":70595965,"user":{"login":"mikolalysenko","id":231686,"avatar_url":"https://avatars.githubusercontent.com/u/231686?v=3","gravatar_id":"","url":"https://api.github.com/users/mikolalysenko","html_url":"https://github.com/mikolalysenko","followers_url":"https://api.github.com/users/mikolalysenko/followers","following_url":"https://api.github.com/users/mikolalysenko/following{/other_user}","gists_url":"https://api.github.com/users/mikolalysenko/gists{/gist_id}","starred_url":"https://api.github.com/users/mikolalysenko/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikolalysenko/subscriptions","organizations_url":"https://api.github.com/users/mikolalysenko/orgs","repos_url":"https://api.github.com/users/mikolalysenko/repos","events_url":"https://api.github.com/users/mikolalysenko/events{/privacy}","received_events_url":"https://api.github.com/users/mikolalysenko/received_events","type":"User","site_admin":false},"created_at":"2015-01-20T02:40:48Z","updated_at":"2015-01-20T02:40:48Z","body":"Thanks for the heads up, this is a serious problem.  I will try to solve this tomorrow."}}