question: private static double distance ( Point p1 , Point p2 ) { double d = ( p1 . x - p2 . x ) * ( p1 . x - p2 . x ) ; d += ( p1 . y - p2 . y ) * ( p1 . y - p2 . y ) ; d = Math . sqrt ( d ) ; return d ; }
target:  Calculates the distance between two points.