Tests whether a point lies inside the polygon. Works for both convex and concave polygons. Points exactly on an edge or vertex are considered inside.
polygon vertices as a flat array [x0, y0, x1, y1, ...]
[x0, y0, x1, y1, ...]
number of vertices to read from vertices
vertices
the point to test
true if the point is inside (or on the boundary of) the polygon
Tests whether a point lies inside the polygon. Works for both convex and concave polygons. Points exactly on an edge or vertex are considered inside.