fix: Forgotten Operator Overload for Multiplication
This commit is contained in:
parent
fd3d1c2e38
commit
db8fe49848
|
@ -13,6 +13,7 @@ public record Vector2D(float X, float 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 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);
|
public static Vector2D operator *(Vector2D vector, float value) => new(vector.X * value, vector.Y * value);
|
||||||
|
public static Vector2D operator *(float value, Vector2D vector) => new(vector.X * value, vector.Y * value);
|
||||||
public static Vector2D operator /(Vector2D vector, float value) => new(vector.X / value, vector.Y / value);
|
public static Vector2D operator /(Vector2D vector, float value) => new(vector.X / value, vector.Y / value);
|
||||||
|
|
||||||
public static float Length(Vector2D vector) => MathF.Sqrt(LengthSquared(vector));
|
public static float Length(Vector2D vector) => MathF.Sqrt(LengthSquared(vector));
|
||||||
|
|
Loading…
Reference in New Issue