static double distance(Vector2 a, Vector2 b) { final dx = a.x - b.x; final dy = a.y - b.y; return sqrt(dx * dx + dy * dy); }