Releases: mrdav30/FixedMathSharp
FixedMathSharp v2.1.1
v2.1.1 is a hardening release focused on correctness, packaging reliability, and overall library quality.
This update adds a few small API improvements, including component-wise epsilon helpers for Vector2d and Vector3d, a convenience Fixed4x4.NormalizeRotationMatrix() extension, and a new companion package, FixedMathSharp.FluentAssertions, for reusable assertions in downstream test projects.
It also fixes several edge cases uncovered during the hardening pass: negative midpoint rounding in FixedMath.Round, clamped-dot handling in Vector3d.Slerp, FixedCurve nullability and small-array construction issues that triggered MemoryPack warnings, and incomplete hashing in Fixed4x4.GetHashCode. On the packaging side, .NET Standard 2.1 dependency handling was cleaned up and the temporary JSON shim was removed in favor of explicit System.Text.Json dependency handling.
Internally, BoundingArea.Intersects, BoundingBox.Intersects, and Vector3d.ClosestPointsOnTwoLines were refactored to reduce complexity without changing behavior, and an unreachable branch in FixedTrigonometry.Pow2 was removed. Along the way, test coverage was expanded substantially across the core math surface, and the repository now publishes coverage reports as part of the project’s documentation and release quality bar.
FixedMathSharp v2.1.0
This release focuses on serialization cleanup and compatibility rather than numeric behavior changes.
Refactor
- Improved serialization support across core numerics and bounds types, including Fixed64, vectors, matrices, quaternions, ranges, curves, BoundingArea, BoundingBox, and BoundingSphere.
- Added explicit System.Text.Json metadata so JSON round-trips no longer depend on IncludeFields or IgnoreReadOnlyProperties.
- Added non-.NET 8 JSON attribute shims to keep serialization annotations working across older target frameworks.
- Simplified BoundingBox serialization to a state-based payload using Min and Max, removing the old versioned serialization field.
- Expanded JSON and MemoryPack round-trip test coverage for the affected types.
- Added .editorconfig and normalized formatting across the touched files.
Migration Note
If you relied on BoundingBox’s old (min, max, version) constructor or serialized Version field, update to the new state-based contract.
FixedMathSharp v2.0.0
Breaking changes
- Dropped .NET Framework 4.8 support.
- Added/standardized support on netstandard2.1 (with net8 retained).
- Serialization stack changed from MessagePack to MemoryPack.
Updated tooling/runtime settings
- C# language version bumped to 11.0.
- Test project modernized:
- moved to net8
- updated test SDK/packages (including xUnit v3-related packages and newer test tooling).
Internal/maintenance
- Added basic AGENTS.md.
- Minor hash code implementation cleanup in core numeric structs (no API expansion, but behavior may differ for hash-based scenarios).
What's Changed
Full Changelog: v1.3.4...2.0.0
FixedMathSharp v1.3.4
- BugFix
- refactored
BoundingBoxto use a canonical min/max representation internally- removes dual-state risk of tracking scope and size separately
- refactored
FixedMathSharp v1.3.3
- New Features
- Added new
DeterministicRandomstruct.- Switched to using xoroshiro128++ with splitmix64 seeding to ensure no allocations, no time/GUID.
- Added new
- Notice
- Marked
ThreadLocalRandomobsoleteDeterministicRandomgives explicit, reproducible streams keyed to your world/feature, independent of threading.
- Marked
FixedMathSharp v1.3.2
- BugFix
- Updated intersection logic to correctly detect intersections between flat (zero-thickness) BoundingAreas in any primary plane.
- Previously, coplanar and edge-touching areas were not recognized as intersecting due to 3D AABB logic.
- Now uses 2D overlap checks when both bounds are flat in the same axis.
- Updated intersection logic to correctly detect intersections between flat (zero-thickness) BoundingAreas in any primary plane.
Full Changelog: v1.3.1...v1.3.2
FixedMathSharp v1.3.1
- New Features
- Added serialization support for MessagePack-CSharp
- Refactors
- Added serialization to
IBoundstructs
- Added serialization to
- Documentation
- Added CONTRIBUTING
FixedMathSharp v1.3.0
-
New Features
- Generic Clamp Utility
- Added Clamp(T value, T min, T max) for general-purpose clamping across comparable types (fills a missing gap in .NET 4.8).
- Generic Clamp Utility
-
Refactors
- Fixed64 Clamp Overload Updated
- Removed nullable max overload to avoid ambiguity with new generic version.
- Replaced with Clamp(Fixed64 value, Fixed64 min, Fixed64 max) for explicit and more performant clamping.
- Fixed64 Clamp Overload Updated
FixedMathSharp v1.2.3
- Expanded Vector2d, Vector3d & Fixed64 operators
- Fixed issue with Vector3d.ClampMagnitude
- Added indexer for Fixed3x3 & Fixed4x4
- Added zeroed out FixedQuaternion & Fixed4x4
FixedMathSharp v1.2.2
- Improved Trigonometric Functions – Enhanced Sin precision and and in turn Cos.
- Better Quaternion & Vector Normalization – Fixed rounding errors and ensured proper unit magnitudes.
- Added Helper Methods – Streamlined common math operations for better performance and maintainability.
For details, see PR #35. 🚀