Source:
double distance(double x1, double y1, double x2, double y2) {
    return Math.sqrt(Math.pow((x2 - x1), 2) + Math.pow((y2 - y1), 2));
}

Get distance between two points.

Pythoneer 6 years ago