Added Vectors and Vector component swizzling

This commit is contained in:
Simon Lübeß
2021-02-20 13:38:05 +01:00
parent 64e9cc1613
commit 9ae376f572
6 changed files with 887 additions and 4 deletions
@@ -0,0 +1,34 @@
#pragma warning disable 4204
using System;
namespace GlitchyEngine.Math
{
/*
extension Vector2
{
[Inline]
public static implicit operator DirectX.Math.Vector2(in Self value) => *(DirectX.Math.Vector2*)&value;
[Inline]
public static implicit operator Self(in DirectX.Math.Vector2 value) => *(Self*)&value;
}
extension Vector3
{
[Inline]
public static implicit operator DirectX.Math.Vector3(in Self value) => *(DirectX.Math.Vector3*)&value;
[Inline]
public static implicit operator Self(in DirectX.Math.Vector3 value) => *(Self*)&value;
}
extension Vector4
{
[Inline]
public static implicit operator DirectX.Math.Vector4(in Self value) => *(DirectX.Math.Vector4*)&value;
[Inline]
public static implicit operator Self(in DirectX.Math.Vector4 value) => *(Self*)&value;
}
*/
}