Skip to content

v0.5.0

Latest

Choose a tag to compare

@github-actions github-actions released this 14 Jun 12:36
· 2 commits to main since this release
v0.5.0
9efadd0

[0.5.0] - 2026-06-14: scale-invariant parallelism, angle and rotation assertions

Minor release. Fixes the scale-dependence of the parallel check and adds an angle-between assertion and a proper-rotation matrix assertion.

Fixed

  • AreParallel / IsParallelTo are now scale-invariant. The check compared the raw cross-product magnitude |u x v| against an absolute tolerance, so whether two vectors read as parallel depended on their length, not just their direction: the same angular deviation passed at unit scale and failed at large scale. It now compares the sine of the angle, |u x v| / (|u| |v|), against the tolerance (an angular measure), the same normalization the package already applied in IsCollinear. A zero or shorter-than-tolerance vector is still treated as parallel to any vector. Tolerances chosen for unit vectors are unchanged in meaning; tolerances applied to non-unit vectors now express an angle rather than a magnitude.

Added

  • Assert.That(vector).HasAngleBetweenApproximately(other, expectedRadians, tolerance) asserts the unsigned angle between two vectors (on [0, pi]) is within tolerance of an expected value. The angle is computed as atan2(|u x v|, u . v), which stays accurate across the whole range where acos of the normalized dot product loses precision near 0 and pi. LinearAlgebra.AngleBetween(u, v) exposes the same computation on the framework-agnostic core.
  • Assert.That(matrix).IsRotation(tolerance) asserts a Matrix4x4 is a proper rotation: orthogonal (M * M^T = I) with determinant +1. Reflections (determinant -1) and matrices carrying translation or scale are rejected. Exposed on the core as LinearAlgebra.IsRotation.

Changed

  • Bumped PackageValidationBaselineVersion from 0.4.2 to 0.4.3 on both packages so ApiCompat strict-mode validates 0.5.0 against the most recently published baseline.