closestPointToPoint method
Computes the closest point on an infinite line defined by the line segment. It's possible to clamp the closest point so it does not exceed the start and end position of the line segment.
Implementation
Vector3 closestPointToPoint(Vector3 point, bool clampToLine, Vector3 result ) {
final t = closestPointToPointParameter( point, clampToLine );
return at( t, result );
}