Repository navigation
·
2 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
[0.5.1] - 2026-11-09: cookbook for the geometric checks, SPDX 3.0 SBOM
Patch release. No API or behavior change.
Changed
- README: copy-paste examples for
HasAngleBetweenApproximately, the scale-invariantIsParallelTo,IsNormalized(vector and quaternion), andIsRotation; a note that onlyPoseRendererneedsusing MathAssertions.Render;; and a corrected sentence that still called per-axis delta rendering future work, although it shipped in 0.2.0. - SBOM: both packages embed an SPDX 3.0 software bill of materials (SPDX 2.2 before), like the other packages of the family.
TUnit.AssertionsandTUnit.Coreminimum versions raised from 1.54.0 to 1.81.10, andSystem.Numerics.Tensorsfrom 10.0.9 to 10.0.14.- Package metadata: the project URL of both packages now points to
https://mathassertions.dev, and the NuGet tags now includetestinganddotnet. - README: now says that adapters for other test frameworks (NUnit, xUnit, MSTest) are not planned; the family targets TUnit.
- Core README: now says that adapters for other test frameworks (NUnit, xUnit, MSTest) are not planned; the family targets TUnit.
- README (namespaces): now lists the real namespaces (
MathAssertions.TUnit,TUnit.Assertions.Extensions,MathAssertions,MathAssertions.Geometry3D,MathAssertions.Render). - README (
usingdirectives): now says that the geometry samples needusing MathAssertions.Geometry3D;, and no longer says thatSystem.Numericsis the only extrausing. The package README says the same. - README (adapter classes): now counts thirteen adapter classes instead of twelve, in the README and the package README, and no longer calls the geometry surface "complete".
- README (
IsCloseTosamples): theVector3.Distanceand per-axis samples now cast thefloatvalues todoubleso they compile. - README (protobuf sample): the projection now casts its fields to
float. - README (pose projection): now warns that the cast from
doubletofloatcan turn distinct positions into the sameVector3, so a pose assertion can pass despite a position error, and says to compare the originaldoublefields when that precision matters. - README (failure diagnostics): now describes what the failure messages contain, per compound type, instead of showing an exact layout. The package README says the same.
- README (failure diagnostics, TUnit wrapper): now says that TUnit prints
Expected ...andbut ...around the message, with "to satisfy" plus the method as the expectation. - README (NaN scope): the NaN and infinity claims are now scoped to the tolerance comparisons, and the README says that pose position, pointcloud on-plane and on-sphere, convex-hull containment, and monotonic-sequence checks do not reject NaN. The package and core READMEs say the same.
- README (NaN table): now documents
NaNvsNaNastrueunder any valid tolerance, in the README and the package README. - README (infinity table): now says that the generic
ReadOnlyTensorSpan<T>overload does not follow the infinity rows: under a tolerance of positive infinity it returnstruefor opposite-sign infinities and for an infinity against a finite value. The core README says the same. - README (tolerance precision): now says that the
doubletolerance is kept and the component difference is computed indouble, instead of claiming that a cast tofloatwould round1e-9to zero. - README (scalar assertions): now says that
ScalarAssertionshas fluentIsApproximatelyEqualTofordoubleandfloat. - Package README (
ScalarAssertions): now says that onlyIsApproximatelyEqualToandIsCloseInUlpsTohavefloatoverloads. - README (
IsParallelTo): now says that the scale-invariant check applies to vectors longer than the tolerance, that a shorter vector counts as parallel to anything, and that the check holds only while both lengths and their product stay below about1.8e19, because the lengths and the cross product are computed infloat. - README (
IsRotation): the cookbook comment now says that two checks must both pass,M * M^T = Iand determinant+1, each within the tolerance: a reflection fails under any tolerance below2; in an affine matrix (last column0, 0, 0, 1) a translation or a scale factor other than+1or-1fails unless both checks stay within the tolerance;CreateScale(-1, -1, 1)passes as a 180-degree rotation; and the whole 4x4 matrix is checked, not the affine form, so a 4D rotation that mixes W with X, Y or Z passes. - README (number theory): now says that
IsDivisibleBy(long.MinValue, -1)throwsOverflowException, next to thelong.MinValue-aware GCD and LCM claim. - Core README (static classes): now lists
PoseRenderer(MathAssertions.Render) next to the five static classes, and no longer says "six static classes" followed by five names. - Core README (stability): now says that breaking changes before 1.0 bump the minor version, like the README.
- Core README (failure messages): now describes the failure-message renderer as internal and unstable.
MathTolerance.IsApproximatelyEqual: theVector3XML docs now say that thedoubletolerance is kept and the difference is computed indouble.MathTolerance.IsApproximatelyEqual<T>(ReadOnlyTensorSpan<T>): the XML docs now say that infinities are compared throughT.Abs(a - b) > toleranceinstead of the scalar infinity rules, which differs from the scalar overloads under a tolerance of positive infinity.MathTolerance.IsCloseInUlps: the XML docs now say that the distance counts steps between adjacent representable values (adjacent values are distance 1) and that values of opposite sign, evendouble.Epsilonand its negation, returnfalse.MathTolerance.RotationAngleDegrees: the XML docs now say that a quaternion compared with itself yields zero or a value within about1e-14degrees, instead of exactly zero.MathTolerance.ExtractAxisAngle: the XML docs now say that the extracted angle lies in[-180, 180]degrees and that its sign is aligned by the axis dot product. The internal failure-message renderer docs say the same.Sequences.IsArithmeticProgression: the XML docs, and those of the adapter method, now say that every difference is compared with the first one, not with the adjacent one.Sequences.IsGeometricProgression: the XML docs, and those of the adapter method, now say that every ratio is compared with the first one, not with the adjacent one.LinearAlgebra.AreParallel: the XML docs now say that the check is scale-invariant only for vectors longer than the tolerance, and only while both lengths and their product stay below about1.8e19(floatrange).LinearAlgebra.IsRotationandLinearAlgebra.IsOrthogonal: the XML docs, and those of the adapter methodIsRotation, now say that both checks ofIsRotationmust pass within the tolerance, that a reflection fails only under a tolerance below2, that in an affine matrix a translation or a scale fails only once one of the checks exceeds the tolerance, that a scale of-1keeps a matrix orthogonal (soCreateScale(-1, -1, 1)is a rotation), and that the affine form is not checked, so a 4D rotation that mixes W with X, Y or Z passes.NumberTheory.IsDivisibleBy: the XML docs now say thatlong.MinValuewith a divisor of-1throwsOverflowException.Intersection(class): the XML docs now say that only ray-plane and ray-triangle have anout float toverload, that ray-sphere and ray-AABB are boolean only, and thattis the ray parameter of the hit pointorigin + t * direction, a distance only for a unit direction.Intersection.Intersects(Ray3D, Plane, out float): the XML docs now say thattis0for a parallel ray and the computed negativetwhen the plane is behind the ray.Intersection.Intersects(Ray3D, Triangle3D, out float): the XML docs now say that the hit requires the ray parametert > 1e-7(a threshold on the parameter, not on a distance), so an origin on the triangle is not a hit, and whattis in eachfalsecase.Intersection.Intersects(Ray3D, Sphere): the XML docs now say that the ray direction must be a unit vector.Ray3D: the XML docs now say that ray-sphere needs a unit direction and that the parallel tests use an absolute epsilon of1e-7(ray-plane on|direction . normal|, ray-triangle on|direction . (edge2 x edge1)|, ray-AABB per direction component, where a near-zero component only requires the origin to lie inside that axis's slab).PoseAssertions: the XML docs now say that theMatrix4x4overload assumes unit scale instead of saying that scale is ignored.Containment.ConvexHullContains: the XML docs no longer promise automatic triangulation in 0.2.0.Statistics.HasPercentileApproximately: the XML docs now describe the rankp/100 * (N - 1)(NumPy "linear", ExcelPERCENTILE.INC) instead of citing NIST/SEMATECH.