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:
2026-04-07 20:09:37 +09:00
parent 9824c1ed19
commit 81eb5cb4cf
7 changed files with 28 additions and 8 deletions

View File

@@ -2,6 +2,7 @@ namespace Misaki.HighPerformance.Mathematics;
[NumericType(typeof(double), sizeof(double), 2, 1, "global::Misaki.HighPerformance.Mathematics.double")]
[NumericConvertable("(double){v}.{c}", typeof(int2), typeof(uint2), typeof(float2), typeof(bool2))]
[NumericConvertable("(double){v}", typeof(int), typeof(uint), typeof(float))]
public partial struct double2
{
}
@@ -23,6 +24,7 @@ public partial struct double2x4
[NumericType(typeof(double), sizeof(double), 3, 1, "global::Misaki.HighPerformance.Mathematics.double")]
[NumericConvertable("(double){v}.{c}", typeof(int3), typeof(uint3), typeof(float3), typeof(bool3))]
[NumericConvertable("(double){v}", typeof(int), typeof(uint), typeof(float))]
public partial struct double3
{
}
@@ -44,6 +46,7 @@ public partial struct double3x4
[NumericType(typeof(double), sizeof(double), 4, 1, "global::Misaki.HighPerformance.Mathematics.double")]
[NumericConvertable("(double){v}.{c}", typeof(int4), typeof(uint4), typeof(float4), typeof(bool4))]
[NumericConvertable("(double){v}", typeof(int), typeof(uint), typeof(float))]
public partial struct double4
{
}