distanceToSquared method

  1. @override
double distanceToSquared(
  1. Vector v
)
override

Implementation

@override
double distanceToSquared(Vector v) {
  final dx = x - v.x, dy = y - v.y;
  return dx * dx + dy * dy;
}