code: public static final double distance(Point p1, Point p2)
      {
          return Math.hypot(p1.getX() - p2.getX(), p1.getY() - p2.getY());
      }
docs: Calculates the distance between points
  @param p1
  @param p2
  @return