public double distance(double[] point1,double[] point2) throws Exception {
  return Math.sqrt(distance2(point1,point2));
}

public double distance ( double [ ] point1 , double [ ] point2 ) throws Exception { return Math . sqrt ( distance2 ( point1 , point2 ) ) ; }
calculates the euclidean distance between two points .
