math.closest.segment.point

Syntax

v = math.closest.segment.point(v1,v2,v3)

Get the closest point on the line segment to the point. The first two arguments define the line segment and the last argument defines the point.

Returns:

v - closest point

Arguments:

v1 - first point of the line segment

v2 - second point of the line segment

v3 - point for closest point calculation