Files
Misaki.HighPerformance/Misaki.HighPerformance.Mathematics/README.md
Misaki aae8e2826f feat(core)!: refactor safety/debug defines, remove FreeList in JobSchedular
Refactor to use MHP_ENABLE_SAFETY_CHECKS, MHP_ENABLE_STACKTRACE, and MHP_ENABLE_MIMALLOC for feature toggling. Remove FreeList allocator in JobSchedular and debug-layer code, simplifying memory management. Improve memory leak detection and reporting, update memory allocation API, and guard all safety/debug features with new defines. Update csproj files, README, and code samples to match new API and toggles. Fix and improve collection types for correct behavior with and without safety checks. The codebase is now more modular and easier to configure for different build environments.

BREAKING CHANGE: Old defines (ENABLE_SAFETY_CHECKS, ENABLE_DEBUG_LAYER, ENABLE_MIMALLOC) are replaced with MHP_* equivalents. FreeList allocator and related debug features are removed. Some APIs and behaviors have changed for safety/debug configuration.
2026-03-30 15:21:09 +09:00

1.4 KiB

Misaki.HighPerformance.Mathematics

Math helpers, geometry primitives, numeric types, and SIMD-friendly utilities for performance-sensitive C# code.

This package focuses on fast scalar and vector math while keeping the API surface practical for game, simulation, rendering, and systems work.

What it includes

  • common math constants and helpers
  • custom numeric types
  • quaternion and random helpers
  • geometry primitives
  • SIMD-oriented vector utilities
  • generated vector extensions and codegen-backed math support

Highlights

  • constants exposed for float and double workflows
  • System.Runtime.Intrinsics-based helper code
  • geometry types for bounds and spatial calculations
  • designed to support vectorized and low-overhead numerical code

Main types

  • math
  • quaternion
  • random
  • svd
  • float
  • double
  • int
  • uint
  • bool
  • AABB
  • OBB
  • Plane
  • SphereBounds

Example

using Misaki.HighPerformance.Mathematics;

float radians = math.radians(90f);
float degrees = math.degrees(radians);
float tau = math.TAU;

float3 a = new float3(1f, 2f, 3f);
float3 b = new float3(4f, 5f, 6f);
float3 c = math.cross(a, b);

Package reference

dotnet add package Misaki.HighPerformance.Mathematics

Notes

This project targets net10.0, enables unsafe code, and uses generated source for parts of its vector API surface.