Releases: mrdav30/FixedMathSharp
Release list
FixedMathSharp v7.1.0
This release expands FixedMathSharp’s exact, allocation-conscious geometry toolkit with new segment and swept-volume queries.
What’s new
- Added strict swept upright-cylinder intersection testing against rotated convex prisms, including full fixed-point-domain and boundary-only contact handling.
- Added exact minimum-distance threshold comparisons for finite 2D segments.
- Added conservative capsule-intersection parameter enclosures with deterministic outward rounding.
- Added exact finite 3D segment point containment.
- Added conservative unique-intersection parameter enclosures clamped to the complete [0, 1] segment domain.
FixedMathSharp v7.0.0 — Full-Domain Determinism
FixedMathSharp v7 is a major deterministic-contract hardening release. It makes
local and world transform intent explicit, carries exact fixed-width
intermediates through critical arithmetic and geometry decisions, and expands
the library's engine-neutral collision/query surface across the full Q32.32
domain.
Important
This release contains source-breaking and result-breaking
changes. Division, normalization, trigonometry, transforms, bounds, and
geometry queries can produce different raw values than v6. Version or
regenerate deterministic replays, hashes, and golden results after migrating.
Highlights
- Full-domain arithmetic: division now rounds exact midpoints to even; new
exactTryAdd/TrySubtractAPIs and fused multiply-add/multiply-divide paths
avoid premature saturation and intermediate rounding. - Explicit transform hierarchy:
FixedTransformnow owns authoritative
local TRS state with derived world views, named reparenting semantics,
cycle-rejecting reparenting, atomic world-space updates, strict matrix import,
and full-domain point conversion. - Hardened vectors, rotations, and matrices: magnitude, normalization,
projection, trigonometry, quaternion construction, scale extraction, and TRS
decomposition now behave consistently at tiny, extreme, reflected, and
near-degenerate inputs. - Expanded exact geometry: bounds and primitives now share
FixedMathSharp.Geometry; v7 adds canonicalFixedOrientedBox, semantic
point anchors, exact ray/segment intervals, finite capsule/cylinder/cone
queries, swept-sphere box and cylinder tests, and rigid triangle contacts. - Safer bounds: derived centers and extents retain full-domain arithmetic,
bounding-sphere factories guarantee containment or throw, and explicitly named
*ClippedToDomainfactories cover intentional clipping. - Measured hot-path work: exact wide-ratio, oriented-box, triangle, and
aligned-frame anchor paths were optimized while preserving allocation-free
deterministic behavior. - Better project documentation: the API reference and coverage report are
now published together on GitHub Pages, with deeper guides synchronized to the
GitHub Wiki.
Breaking Changes
- Import geometry types from
FixedMathSharp.Geometry. - Replace ambiguous
FixedTransformproperties with explicit local/world
members.Parentis read-only; useSetParentKeepingLocalor
TrySetParentKeepingWorld. Replace arbitrary matrix construction with
component construction orTryCreateFromLocalMatrix. - Matrix scale APIs were renamed or removed in favor of scale magnitudes,
canonical lossy scale, and checked TRS decomposition. FixedQuaternion.Anglenow returns the full shortest physical rotation;
remove downstream* 2corrections.- Removed
FixedBoundCircle.RadiusSquared,FixedBoundSphere.RadiusSquared,
Vector3d.ClosestPointsOnTwoLines, andFixedMath.AddOverflowHelper; use the
exact bound predicates, segment-owned closest-point APIs, and checked
language/runtime primitives instead. - Some exact bounds operations now throw
OverflowExceptionrather than
silently returning a saturated or under-containing result. - Chronicler transform hashes now contain authoritative local position,
rotation, and scale only. v6 transform hashes are intentionally incompatible.
Upgrade
Read the complete
v6 → v7 migration guide
before upgrading production simulations.
Full changelog:
73cd639…5430dc9 (inclusive)
FixedMathSharp v6.0.0
FixedMathSharp v6 is a bounds and geometry hardening release focused on clearer dimensional ownership, deterministic hot-path behavior, and reusable lower-stack geometry for LSF libraries.
Highlights
- Reworked
FixedBoundAreainto a true 2DVector2dAABB. - Made
FixedBoundBoxthe explicit 3D AABB type with named factories:FromMinMax,FromCenterAndSize, andFromCenterAndScope.
- Removed hidden
FixedBoundBox.Verticesarray storage in favor of allocation-freeGetCornerandCopyCorners. - Added new reusable primitives:
FixedBoundCircle,FixedRay2d,FixedSegment2d,FixedTriangle2d,FixedSegment, andFixedTriangle.
- Standardized bounds intersection semantics so default
Intersectsmethods are boundary-inclusive. - Added
IntersectsStrictwhere positive area/volume overlap matters. - Tightened radius handling for
FixedBoundSphereand added explicitBoundingSphereState. - Added optional
FixedMathSharp.Chronicler/.Leancompanion packages for deterministicChronicleHashWriterhelpers. - Expanded bounds, geometry, serialization, and benchmark coverage.
Breaking Changes
- 3D
FixedBoundAreasemantics were removed. UseFixedBoundBoxfor 3D bounds andFixedBoundAreafor pure 2D planar bounds. new FixedBoundBox(center, size)was removed; use named factories.FixedBoundBox.Verticeswas removed; useGetCornerorCopyCorners.- Boundary-touching bounds now count as intersections by default; use
IntersectsStrictfor positive overlap only. - Direct serialized/hash handling of
FixedBoundAreaandFixedBoundSphereshould be reviewed.
See MIGRATION.md for more details.
FixedMathSharp v5.0.2
Added
- Added
FixedTransform, a mutable deterministic transform shell backed byFixed4x4for shared LSF host/runtime transform state. - Added barycentric product helpers:
FixedMath.SumSquaredBarycentricProducts(...)FixedMath.SumBarycentricProducts(...)Fixed3x3.CreateBarycentricProductSums(...)
Fixed
- Fixed
Fixed4x4.SetGlobalScale(...)so scale updates preserve translation and rotation instead of rebuilding from scale alone.
Validation
- Added focused tests for
FixedTransform, barycentric product helpers, and scale mutation preservation.
FixedMathSharp v5.0.1
Fixed64 Unity Serialization Fix
Unity does not serialize readonly fields, so Fixed64 values backed by a readonly long could be edited in the inspector but reload as zero from assets or prefabs. Fixed64 now uses a Unity-compatible raw-value field layout while remaining engine-agnostic and wrapper-free.
FixedMathSharp v5.0.0
FixedMathSharp v5.0.0
FixedMathSharp v5.0.0 is a major API hardening, determinism, and performance release. It removes legacy API shapes, makes numeric conversion boundaries explicit, standardizes 3D transform conventions, and adds a BenchmarkDotNet performance lab.
What's Changed
- Hardened the v5 public API by removing ambiguous legacy surfaces, standardizing vector naming and mutation patterns, centralizing scalar algorithms on
FixedMath, and splitting large numeric types into focused partial files. - Renamed bounds APIs to fixed-point naming:
FixedBoundBox,FixedBoundSphere,FixedBoundArea,FixedBoundFrustum, andFixedEnclosureType. - Made
Fixed64conversions explicit:Parse/TryParsenow handle decimal value text.ParseRaw/TryParseRawhandle raw Q32.32 payload text.- Floating-point conversions now reject non-finite or out-of-range values.
- Standardized 3D transform semantics around
+Xright,+Yup,+Zforward, row-vector transforms,M41/M42/M43translation, and left-to-right affine composition. - Added
Axis3dandCoordinateConvention3dfor adapting external coordinate systems without changing core runtime semantics. - Fixed correctness issues in quaternion direction handling, matrix composition, checked floating-point conversion paths, and stale build assets.
- Added diagnostic formatting support with
ToString(...),TryFormat(...), andISpanFormattableon supported targets. - Added BenchmarkDotNet coverage for scalar math, trigonometry, vectors, quaternions, matrices, bounds, curves, ranges, RNG, serialization, and diagnostics formatting.
- Improved performance across scalar/trigonometry guards, bounds construction, vector normalization, matrix transforms/inversion, quaternion paths, span-based sphere construction, and squared-distance checks.
- Hardened local and CI workflows with isolated intermediate outputs, opt-in local coverage, and preserved
Release/ReleaseLeanvalidation paths. - Expanded tests around the new API, conversion policy, transform conventions, diagnostics formatting, geometry behavior, and benchmarked hot paths.
Breaking Changes
This release intentionally includes source-breaking API cleanup. See docs/MIGRATION.md before upgrading.
High-impact changes:
- Bounds types were renamed:
BoundingBox->FixedBoundBoxBoundingSphere->FixedBoundSphereBoundingArea->FixedBoundAreaBoundingFrustum->FixedBoundFrustumContainmentType->FixedEnclosureType
Fixed64.ParseandFixed64.TryParsenow parse decimal value text. UseParseRaw/TryParseRawfor raw Q32.32 payload text.- Removed or replaced ambiguous numeric APIs, including:
Fixed64(double)Fixed64.FractionFixed64arithmetic operators withlong- vector double constructors
FixedRange.InRange(double)DeterministicRandom.NextDouble
- Vector naming was standardized:
x/y/z/w->X/Y/Z/WNormal->NormalizedNormalize()->NormalizeInPlace()SqrMagnitude->MagnitudeSquaredSqrDistance->DistanceSquared
- Legacy public vector-result
out Vector*dhelper overloads were removed in favor of return-by-value APIs and explicit*InPlacemethods. Fixed4x4.Decomposenow returnstranslation, rotation, scale.- Matrix code should be audited for row-vector affine semantics.
Migration
Review docs/MIGRATION.md before upgrading production code, especially if you persist raw Fixed64 text, synchronize deterministic state, copy matrices from engine APIs, or depend on v4 geometry type names.
FixedMathSharp v4.0.1
FixedMathSharp v4.0.1
This patch focuses on release reliability, test hardening, and documentation for the Q32.32 Fixed64 core.
What's Changed
- Hardened NuGet publishing for release tags, including manual dispatch by tag, checked-out release refs, tag/version validation, and stricter package artifact validation.
- Updated release packaging scripts to include both
FixedMathSharpandFixedMathSharp.FluentAssertionsoutputs acrossReleaseandReleaseLean. - Moved coverage publishing to the
Releaseconfiguration. - Expanded focused test coverage to reach 100% line and branch coverage across the instrumented library.
- Removed confirmed unreachable hot-path branches in fixed-point math, bounds/ray intersection, curve evaluation, and deterministic RNG paths.
- Renamed the trigonometry partial file to
FixedMath.Trigonometry.csfor clearer source organization. - Added consistent MIT license headers across source files.
- Added
Fixed64representation documentation covering Q32.32 layout, raw values, range, precision, and scaled-integer behavior.
Notes
- No public API changes are intended in this patch.
FixedMathSharp v4.0.0
FixedMathSharp 4.0.0 is a major geometry, transform, packaging, and reliability release. This version expands the deterministic fixed-point API with frustum, plane, ray, and 4D vector support while hardening several core math paths.
Breaking Changes
- Removed the public
IBoundabstraction and genericIntersects(IBound)dispatch. Use the new strongly typedContains(...)andIntersects(...)overloads onBoundingBox,BoundingArea,BoundingSphere,BoundingFrustum,FixedPlane, andFixedRay. - Renamed the no-MemoryPack build/package path from
ReleaseNoMemoryPack/FixedMathSharp.NoMemoryPacktoReleaseLean/FixedMathSharp.Lean.
Added
- Added
BoundingFrustumwith matrix/plane construction, containment checks, intersection checks, corners, planes, and clamp support. - Added
FixedPlane,FixedPlaneIntersectionType, andContainmentTypefor richer deterministic spatial queries. - Added
FixedRaywith intersections against planes, boxes, areas, spheres, and frustums. - Added
Vector4dwith arithmetic, comparisons, normalization, distance/dot helpers, matrix transforms, fuzzy equality helpers, JSON support, and MemoryPack support. - Added expanded
Fixed4x4transform helpers, including translation, rotation, scale, look-at, world, orthographic, perspective, inversion, point transforms, andVector4dtransforms. - Added Lean package output for
FixedMathSharp.FluentAssertions.Lean.
Improved
- Hardened
BoundingBox,BoundingArea,BoundingSphere, and frustum behavior with typed containment/intersection APIs. - Hardened quaternion normalization, rotation, Euler conversion, division, interpolation, and matrix conversion behavior.
- Improved
Fixed4x4affine handling and transform/inversion coverage. - Improved release automation with centralized archive output and a NuGet publishing workflow for standard and Lean packages.
- Reorganized source files by domain while preserving the public
FixedMathSharpnamespace.
Fixed
- Fixed a
Fixed64multiplication saturation edge case where overflow during rounded 128-bit shifting could wrap before saturation. - Fixed release-configuration test discrepancies, including Lean/MemoryPack-disabled scenarios.
- Removed unreachable/dead bounding-sphere merge code surfaced during coverage hardening.
Quality
- Expanded tests across geometry, bounds, matrices, quaternions, vectors, assertions, serialization-related paths, and Lean builds.
- Added complexity exception documentation for intentionally complex performance-sensitive methods.
- Refreshed README and contributor-facing guidance for the current API and release workflow.
Full Changelog: 1bec7da...be39470
FixedMathSharp v3.0.1
Fixed
- Fixed a
Fixed64initialization issue that could trigger circular static-constructor errors when operators were used during type initialization. - Updated internal max/min fallback paths to avoid relying on static members during early initialization.
Added
- Added a
NoMemoryPackbuild/package variant for consumers that want to use FixedMathSharp without theMemoryPackdependency. - Added a compile-time shim so the library can build cleanly when
MemoryPackis disabled.
Changed
- Updated build and packaging scripts to produce both standard and
NoMemoryPackrelease outputs. - Migrated the solution to
.slnxand refreshed CI/workflow configuration accordingly. - Improved public documentation and README guidance, including package selection and Unity/Burst recommendations.
FixedMathSharp v3.0.0
- Breaking Changes
- Removed float-based numeric/vector overloads to enforce deterministic usage across
Vector2dandVector3d. - Core precision API refactor:
Fixed64.Precisionreplaced withFixed64.MinIncrement.- Default epsilon/tolerance semantics were redefined (
FixedMath.DEFAULT_TOLERANCE_L/Fixed64.Epsilon), which can change fuzzy-comparison behavior.
- Removed float-based numeric/vector overloads to enforce deterministic usage across
- Added
FixedMath.InvertedPIconstant.- New
Vector3d.SnapSmallComponentsToZero(...)helper for zeroing tiny components under a threshold.
- Changed
- Degree/radian conversion paths in trigonometry moved to fixed-point math paths for deterministic consistency.
- Vector epsilon guards improved across vector/component comparison logic.
- Fixed
- Hardened
Fixed64scalar multiply/divide operator behavior, including improved 128-bit intermediate rounding/saturation handling. - Quaternion math corrections:
- Euler conversion alignment (YXZ order consistency).
- Rotation extraction stabilization (including matrix-based paths).
- Additional
Fixed64operator corrections from #48.
- Hardened
- Maintenance
- Project/test setup cleanup and release metadata housekeeping commits.
- Migration Notes
- Replace uses of
Fixed64.PrecisionwithFixed64.MinIncrement. - Remove/update any call sites relying on removed float overloads.
- Re-validate tolerance-sensitive tests/simulations due to epsilon behavior changes.
- Replace uses of