static double distance(IPoint p1,IPoint p2){
  return Math.sqrt((p1.getX() - p2.getX()) * (p1.getX() - p2.getX()) + (p1.getY() - p2.getY()) * (p1.getY() - p2.getY()));
}

static double distance ( IPoint p1 , IPoint p2 ) { return Math . sqrt ( ( p1 . getX ( ) - p2 . getX ( ) ) * ( p1 . getX ( ) - p2 . getX ( ) ) + ( p1 . getY ( ) - p2 . getY ( ) ) * ( p1 . getY ( ) - p2 . getY ( ) ) ) ; }
return the euclidean distance between the given two points .
