A new point on the segment; the arguments are left unchanged. A zero-length segment
returns a itself.
Description
Find the point of a line segment nearest to a given point. The result is clamped to the
segment, so it never lands on the infinite line beyond the endpoints.
closestPointOnSegment