Files
Misaki.HighPerformance/Misaki.HighPerformance.Mathematics
Misaki 9f7507ba71 Refactor SPMD lane abstraction and add gather support
- Rename ISPMD interfaces to ISPMDLane for clarity
- Add gather and mask load methods to ISPMDLane, implement for ScalarLane and WideLane
- Add GetUnsafePtr() for direct pointer access
- Update MathV and vector types to use new interface and gather methods
- Update SPMD job interfaces and implementations to ISPMDLane
- Improve hash codes, range checks, and safety checks in vector types
- Update codegen templates for new interface/methods
- Refactor SPMD jobs to use gather methods for efficient vectorized access
2026-04-25 11:50:51 +09:00
..
2025-11-04 20:48:25 +09:00
2026-02-12 19:43:04 +09:00
2026-03-30 12:47:29 +09:00
2025-11-04 20:48:25 +09:00

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.