static double distance(Offset p1, Offset p2) { return sqrt(pow(p2.dy - p1.dy, 2) + pow(p2.dx - p1.dx, 2)); }