Returns the distance between point p and segment p1 to p2.
p
p1
p2
external static num pointToSegmentDistance(Point p, Point p1, Point p2);