distanceToSquared method

double distanceToSquared (Vector2 arg)

Squared distance from this to arg

Implementation

double distanceToSquared(Vector2 arg) {
  final double dx = x - arg.x;
  final double dy = y - arg.y;

  return dx * dx + dy * dy;
}