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