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:
2025-09-23 22:57:12 +09:00
parent 73a0c6e187
commit ac73e28f26
52 changed files with 3658 additions and 5150 deletions

View File

@@ -18,6 +18,23 @@
//Console.WriteLine($"Count should be {threadCount * 990}, actual: {map.Count}");
using Misaki.HighPerformance.Test.Benchmark;
//using Misaki.HighPerformance.Test.Benchmark;
BenchmarkDotNet.Running.BenchmarkRunner.Run<MathematicsBenchmark>();
//BenchmarkDotNet.Running.BenchmarkRunner.Run<MathematicsBenchmark>();
using Misaki.HighPerformance.LowLevel.Buffer;
using Misaki.HighPerformance.LowLevel.Collections;
var scope = AllocationManager.CreateStackScope();
var array = new UnsafeArray<int>(10, Allocator.Stack);
for (var i = 0; i < array.Count; i++)
{
array[i] = i;
}
foreach (var item in array)
{
Console.WriteLine(item);
}
scope.Dispose();

View File

@@ -1,7 +1,7 @@
using Misaki.HighPerformance.Jobs;
using Misaki.HighPerformance.LowLevel.Buffer;
using Misaki.HighPerformance.LowLevel.Collections;
using Misaki.HighPerformance.LowLevel.Helpers;
using Misaki.HighPerformance.LowLevel.Utilities;
namespace Misaki.HighPerformance.Test.UnitTest.Jobs;