Moved vector type files

This commit is contained in:
Simon Lübeß
2023-06-25 01:11:06 +02:00
parent fa2277cd99
commit 5f5da2ed35
8 changed files with 191 additions and 98 deletions
+43
View File
@@ -0,0 +1,43 @@
using Bon;
using System;
namespace GlitchyEngine.Math;
[BonTarget]
[Vector<int32, 2>]
[ComparableVector<int32, 2>]
[VectorMath<int32, 2>]
[SwizzleVector(2, "GlitchyEngine.Math.int")]
public struct int2
{
public static implicit operator float2(int2 value)
{
return float2(value.X, value.Y);
}
}
[BonTarget]
[Vector<int32, 3>]
[ComparableVector<int32, 3>]
[VectorMath<int32, 3>]
[SwizzleVector(3, "GlitchyEngine.Math.int")]
public struct int3
{
public static implicit operator float3(int3 value)
{
return float3(value.X, value.Y, value.Z);
}
}
[BonTarget]
[Vector<int32, 4>]
[ComparableVector<int32, 4>]
[VectorMath<int32, 4>]
[SwizzleVector(4, "GlitchyEngine.Math.int")]
public struct int4
{
public static implicit operator float4(int4 value)
{
return float4(value.X, value.Y, value.Z, value.W);
}
}