mirror of
https://github.com/aharabada/glitchy-engine-beef.git
synced 2026-09-05 21:01:52 +00:00
Removed warnings when converting Vectors from GlitchyEngine to DirectX
This commit is contained in:
@@ -217,9 +217,11 @@ namespace GlitchyEngine.Math
|
|||||||
}
|
}
|
||||||
|
|
||||||
[Inline]
|
[Inline]
|
||||||
|
#unwarn
|
||||||
public static implicit operator Vector4(in Self value) => *(Vector4*)&value;
|
public static implicit operator Vector4(in Self value) => *(Vector4*)&value;
|
||||||
|
|
||||||
[Inline]
|
[Inline]
|
||||||
|
#unwarn
|
||||||
public static implicit operator Quaternion(in Vector4 value) => *(Quaternion*)&value;
|
public static implicit operator Quaternion(in Vector4 value) => *(Quaternion*)&value;
|
||||||
|
|
||||||
public static bool operator ==(Quaternion l, Quaternion r)
|
public static bool operator ==(Quaternion l, Quaternion r)
|
||||||
|
|||||||
@@ -272,13 +272,6 @@ namespace GlitchyEngine.Math
|
|||||||
|
|
||||||
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1}", X, Y);
|
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1}", X, Y);
|
||||||
|
|
||||||
// Todo: move to extension
|
|
||||||
[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;
|
|
||||||
|
|
||||||
[Inline]
|
[Inline]
|
||||||
public static explicit operator Self(float value) => Self(value);
|
public static explicit operator Self(float value) => Self(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -324,14 +324,6 @@ namespace GlitchyEngine.Math
|
|||||||
|
|
||||||
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1} Z:{2}", X, Y, Z);
|
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1} Z:{2}", X, Y, Z);
|
||||||
|
|
||||||
// Todo: move to extension
|
|
||||||
|
|
||||||
[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;
|
|
||||||
|
|
||||||
[Inline]
|
[Inline]
|
||||||
public static explicit operator Self(float value) => Self(value);
|
public static explicit operator Self(float value) => Self(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -308,14 +308,6 @@ namespace GlitchyEngine.Math
|
|||||||
|
|
||||||
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1} Z:{2} W:{3}", X, Y, Z, W);
|
public override void ToString(String strBuffer) => strBuffer.AppendF("X:{0} Y:{1} Z:{2} W:{3}", X, Y, Z, W);
|
||||||
|
|
||||||
// Todo: move to extension
|
|
||||||
|
|
||||||
[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;
|
|
||||||
|
|
||||||
[Inline]
|
[Inline]
|
||||||
public static explicit operator Self(float value) => Self(value);
|
public static explicit operator Self(float value) => Self(value);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,9 +1,10 @@
|
|||||||
|
// Disable warning when taking pointer of in-Parameter
|
||||||
#pragma warning disable 4204
|
#pragma warning disable 4204
|
||||||
|
|
||||||
using System;
|
using System;
|
||||||
|
|
||||||
namespace GlitchyEngine.Math
|
namespace GlitchyEngine.Math
|
||||||
{
|
{
|
||||||
/*
|
|
||||||
extension Vector2
|
extension Vector2
|
||||||
{
|
{
|
||||||
[Inline]
|
[Inline]
|
||||||
@@ -30,5 +31,4 @@ 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;
|
||||||
}
|
}
|
||||||
*/
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user