distanceToSquared method Null safety
- Vector2 arg
Squared distance from this to arg
Implementation
double distanceToSquared(Vector2 arg) {
final dx = x - arg.x;
final dy = y - arg.y;
return dx * dx + dy * dy;
}
Squared distance from this to arg
double distanceToSquared(Vector2 arg) {
final dx = x - arg.x;
final dy = y - arg.y;
return dx * dx + dy * dy;
}