Returns the distance from point to the polygon's boundary, signed so that points inside the polygon get a negative distance and points outside get a positive one.
point
polygon vertices as a flat array [x0, y0, x1, y1, ...]
[x0, y0, x1, y1, ...]
number of vertices to read from vertices
vertices
the query point
the signed distance (negative inside, positive outside)
Returns the distance from
pointto the polygon's boundary, signed so that points inside the polygon get a negative distance and points outside get a positive one.