distanceTo method

  1. @override
double distanceTo(
  1. Point<T> other
)
override

Returns the distance between this and other.

Implementation

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