The distance between points a and b.
a
b
static double distance(Point a, Point b) { final double x = (a.x - b.x); final double y = (a.y - b.y); return math.sqrt((x * x) + (y * y)); }