Added explicit conversion from float to Vector

This commit is contained in:
Simon Lübeß
2021-03-26 19:12:08 +01:00
parent 0f62637662
commit 5a6abc9b8b
3 changed files with 306 additions and 297 deletions
+3
View File
@@ -223,5 +223,8 @@ namespace GlitchyEngine.Math
[Inline] [Inline]
public static implicit operator Self(in DirectX.Math.Vector2 value) => *(Self*)&value; public static implicit operator Self(in DirectX.Math.Vector2 value) => *(Self*)&value;
[Inline]
public static explicit operator Self(float value) => Self(value);
} }
} }
+3
View File
@@ -293,5 +293,8 @@ namespace GlitchyEngine.Math
[Inline] [Inline]
public static implicit operator Self(in DirectX.Math.Vector3 value) => *(Self*)&value; public static implicit operator Self(in DirectX.Math.Vector3 value) => *(Self*)&value;
[Inline]
public static explicit operator Self(float value) => Self(value);
} }
} }
+3
View File
@@ -274,5 +274,8 @@ namespace GlitchyEngine.Math
[Inline] [Inline]
public static implicit operator Self(in DirectX.Math.Vector4 value) => *(Self*)&value; public static implicit operator Self(in DirectX.Math.Vector4 value) => *(Self*)&value;
[Inline]
public static explicit operator Self(float value) => Self(value);
} }
} }