Refactor and enhance math, memory, and utilities
Refactored `sincos` usage in `quaternion` to use tuple-based returns for improved readability. Introduced a `random` struct with methods for generating random values of various types and dimensions, including ranges and directions. Added a `DynamicArray` class for dynamic resizing and manipulation of collections. Enhanced `SlotMap` with new methods for safe access and updates. Updated `uint` vector types with `NumericConvertable` attributes for better type interoperability. Removed the `MathUtilities` class and refactored `adj` and `adjInverse` methods for encapsulation. Improved memory management with `StackAllocator` and `UnsafeArray` enhancements. Added geometry utilities like `AABB`, `OBB`, `Plane`, and `SphereBounds` for 3D operations. Updated project configuration for versioning and NuGet packaging. Performed general code cleanup, improved validation, and aligned with modern C# practices.
This commit is contained in:
@@ -3,6 +3,8 @@
|
||||
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))]
|
||||
[NumericConvertable("{v}.{c} ? 1.0 : 0.0", typeof(bool2))]
|
||||
public partial struct double2
|
||||
{
|
||||
}
|
||||
@@ -23,6 +25,8 @@ 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))]
|
||||
[NumericConvertable("{v}.{c} ? 1.0 : 0.0", typeof(bool3))]
|
||||
public partial struct double3
|
||||
{
|
||||
}
|
||||
@@ -43,6 +47,8 @@ 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))]
|
||||
[NumericConvertable("{v}.{c} ? 1.0 : 0.0", typeof(bool4))]
|
||||
public partial struct double4
|
||||
{
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user