distanceToSquared method

num distanceToSquared(
  1. Vector2 v
)

Implementation

num distanceToSquared(Vector2 v) {
  var dx = x - v.x, dy = y - v.y;
  return dx * dx + dy * dy;
}