feat: - Operation Override
This commit is contained in:
parent
db8fe49848
commit
a03470d043
|
@ -10,6 +10,7 @@ public record Vector2D(float X, float Y)
|
|||
public readonly static Vector2D Right = new(1f, 0f);
|
||||
public readonly static Vector2D One = new(1f, 1f);
|
||||
|
||||
public static Vector2D operator -(Vector2D vector) => new(0f - vector.X, 0f - vector.Y);
|
||||
public static Vector2D operator +(Vector2D left, Vector2D right) => new(left.X + right.X, left.Y + right.Y);
|
||||
public static Vector2D operator -(Vector2D left, Vector2D right) => new(left.X - right.X, left.Y - right.Y);
|
||||
public static Vector2D operator *(Vector2D vector, float value) => new(vector.X * value, vector.Y * value);
|
||||
|
|
Loading…
Reference in New Issue