I've implemented a point-in-polygon algorithm based on http://alienryderflex.com/polygon/.
It works fine but, as it says in the article:
If the test point is on the border of the polygon, this algorithm will deliver unpredictable results
It turns out I need the algorithm to return true when the test point is on the border/edge (and the vertices) of the polygon.
Is there either:
- An alternative algorithm that will help me; or
- A way to modify this algorithm to get what I want (e.g. by expanding the polygon a little bit before running the algorithm)