feat(numeric): add scalar conversions and quaternion fix
Added [NumericConvertable] attributes for scalar type conversions to all vector structs. Fixed bitwise mask calculation in quaternion.cs for improved correctness. Updated Program.cs with quaternion test code and bumped project version to 1.3.2.
This commit is contained in:
@@ -2,6 +2,7 @@ namespace Misaki.HighPerformance.Mathematics;
|
||||
|
||||
[NumericType(typeof(float), sizeof(float), 2, 1, "global::Misaki.HighPerformance.Mathematics.float")]
|
||||
[NumericConvertable("(float){v}.{c}", typeof(int2), typeof(uint2), typeof(double2), typeof(bool2))]
|
||||
[NumericConvertable("(float){v}", typeof(int), typeof(uint), typeof(double))]
|
||||
public partial struct float2
|
||||
{
|
||||
}
|
||||
@@ -26,6 +27,7 @@ public partial struct float2x4
|
||||
|
||||
[NumericType(typeof(float), sizeof(float), 3, 1, "global::Misaki.HighPerformance.Mathematics.float")]
|
||||
[NumericConvertable("(float){v}.{c}", typeof(int3), typeof(uint3), typeof(double3), typeof(bool3))]
|
||||
[NumericConvertable("(float){v}", typeof(int), typeof(uint), typeof(double))]
|
||||
public partial struct float3
|
||||
{
|
||||
}
|
||||
@@ -62,6 +64,7 @@ public partial struct float3x4
|
||||
|
||||
[NumericType(typeof(float), sizeof(float), 4, 1, "global::Misaki.HighPerformance.Mathematics.float")]
|
||||
[NumericConvertable("(float){v}.{c}", typeof(int4), typeof(uint4), typeof(double4), typeof(bool4))]
|
||||
[NumericConvertable("(float){v}", typeof(int), typeof(uint), typeof(double))]
|
||||
public partial struct float4
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user