Returns the closest point from a point p on a segment p1 to p2.
external static Point closestPointOnSegment(Point p, Point p1, Point p2);