operator - method
Implementation
Vector2 operator -(Object other) {
if (other is Vector2) {
return Vector2(x - other.x, y - other.y);
} else if (other is num) {
return Vector2(x - other, y - other);
}
throw ArgumentError('Invalid operand type for -');
}