double euclidean(p1, p2)

Returns the euclidean distance between p1 and p2.

Source

static double euclidean(Point p1, Point p2) {
  return sqrt(pow(p2.x - p1.x, 2) + pow(p2.y - p1.y, 2));
}