closestPointOnLineSegment

Returns the closest point to the point on a line segment composed of the a and b points.