Function closestPointLine

Returns the closest point on a line to a given point