public static double ptLineDist(double x1,double y1,double x2,double y2,double px,double py){
  return Math.sqrt(ptLineDistSq(x1,y1,x2,y2,px,py));
}

public static double ptLineDist ( double x1 , double y1 , double x2 , double y2 , double px , double py ) { return Math . sqrt ( ptLineDistSq ( x1 , y1 , x2 , y2 , px , py ) ) ; }
returns the distance from a point to a line . the distance measured is the distance between the specified point and the closest point on the infinitely - extended line defined by the specified coordinates . if the specified point intersects the line , this method returns 0 . 0 .
