double distanceTo(Offset f1, Offset f2){ var dx= f1.dx - f2.dx; var dy= f1.dy - f2.dy; return sqrt(dx * dx + dy * dy); }