Given a line segment and a point P, this returns the point on the segment that is closest to P.
Example:
nearestPoint = PointOnSegmentNearestToPoint( A, B, P )
* = mandatory