refactor: Vector2D.Invert to Operator
This commit is contained in:
parent
83d8a03be3
commit
c3bcaaee06
|
@ -28,7 +28,7 @@ public record Vector2D(float X, float Y)
|
|||
|
||||
public static float Distance(Vector2D from, Vector2D to) => Length(FromTo(from, to));
|
||||
|
||||
public static Vector2D Invert(Vector2D vector) => new(0f - vector.X, 0f - vector.Y);
|
||||
public static Vector2D Invert(Vector2D vector) => -vector;
|
||||
public static Vector2D Add(Vector2D left, Vector2D right) => left + right;
|
||||
public static Vector2D Subtract(Vector2D left, Vector2D right) => left - right;
|
||||
public static Vector2D Multiply(Vector2D vector, float value) => vector * value;
|
||||
|
|
Loading…
Reference in New Issue