Files
Misaki 81eb5cb4cf 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.
2026-04-07 20:09:37 +09:00

67 lines
2.5 KiB
C#

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
{
}
[NumericType(typeof(double2), sizeof(double), 2, 2, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double2x2
{
}
[NumericType(typeof(double2), sizeof(double), 2, 3, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double2x3
{
}
[NumericType(typeof(double2), sizeof(double), 2, 4, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
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
{
}
[NumericType(typeof(double3), sizeof(double), 3, 2, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double3x2
{
}
[NumericType(typeof(double3), sizeof(double), 3, 3, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double3x3
{
}
[NumericType(typeof(double3), sizeof(double), 3, 4, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
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
{
}
[NumericType(typeof(double4), sizeof(double), 4, 2, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double4x2
{
}
[NumericType(typeof(double4), sizeof(double), 4, 3, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double4x3
{
}
[NumericType(typeof(double4), sizeof(double), 4, 4, "global::Misaki.HighPerformance.Mathematics.double", elementType: typeof(double))]
public partial struct double4x4
{
}