distanceTo method

double distanceTo(
  1. Point other
)

Returns the Euclidean distance to another point.

Implementation

double distanceTo(Point other) {
  final dx = x - other.x;
  final dy = y - other.y;
  return math.sqrt(dx * dx + dy * dy);
}