distanceTo method

double distanceTo(
  1. Point other
)

Euclidean distance from this point to other.

Implementation

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