Finds the point on the polygon's boundary closest to point and writes it to out. point may lie inside, outside, or on the polygon; the result is always on an edge.
point
out
the vector to store the closest 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
Finds the point on the polygon's boundary closest to
pointand writes it toout.pointmay lie inside, outside, or on the polygon; the result is always on an edge.