question: public static double ptSegDist ( double x1 , double y1 , double x2 , double y2 , double px , double py ) { return Math . sqrt ( ptSegDistSq ( x1 , y1 , x2 , y2 , px , py ) ) ; }
target:  Returns the distance from a point to a line segment. The distance measured is the distance between the specified point and the closest point between the specified end points. If the specified point intersects the line segment in between the end points, this method returns 0.0.