closestPointToPoint
Writes the closest point on the line for a given point into target.
Return
The closest point on the line.
Parameters
point
The point to compute the closest point on the line for.
clampToLine
Whether to clamp the result to the range [0,1] or not.
target
The target vector that is used to store the method's result.