• v0.2.0 fb2b3c0f74

    v0.2.0
    All checks were successful
    test / test (push) Successful in 4m47s
    Stable

    sicher released this 2026-10-24 13:12:09 +02:00 | 0 commits to main since this release

    • orthographicOffCenter* take (left, right, bottom, top, near, far)
      (breaking, silently): the order of DirectXMath and GLM. They took top before
      bottom, inherited from zmath. All six parameters are f32, so a call in the
      old order still compiles -- and flips the projection vertically. Swap the
      third and fourth arguments of every call.
    • NaN propagates through min, max, clamp, saturate (breaking): they
      returned the other operand, so clamp(NaN, 0, 1) was 0 and a NaN colour came
      out of rgbToHsl/rgbToSrgb as a plausible one. Now NaN in gives NaN, and
      the colour functions follow. The old behaviour is there by name: minNum,
      maxNum, clampNum, saturateNum (IEEE 754 minimumNumber; @min/@max,
      one instruction on arm64). The *Fast forms are documented as NaN result
      unspecified, for finite input only.
    • asin and acos are NaN outside [-1, 1] (breaking): they clamped, so
      asin(1.1) and asin(100000) were pi/2. That is DirectXMath's SIMD
      behaviour; Sony's Vector Math, NumPy and IEEE give NaN, as Lin now does. For
      input that can overshoot by rounding, clamp first: acos(clamp(d, -1, 1)).
    • mul(v, m) follows the FMA mode: vector times matrix was a plain
      multiply-and-add in every mode. It now uses the same two mulAdd chains as
      mul(m0, m1), so mul(v, m) is bit for bit the matching row of a matrix
      product (in strict mode too, where the summation order changed). A test pins
      what each mode does: one rounding or two.
    • lerp and lerpV follow the FMA mode: one subtract and one mulAdd
      (they were a plain multiply and add in every mode). Their comment now says
      what they guarantee: exact at t = 0 and for equal ends, exact at t = 1 only
      up to rounding.
    • Stricter tests: trig tolerances from the measured errors (acos was
      checked to 0.1, now 1e-6), tests for lerp, adjustContrast, norInt and
      every matrix load/store layout, and the FMA modes' rounding pinned.
    • CI on the urverk forge: .forgejo/workflows/test.yml runs scripts/gate
      on every push, on the zig-arm64 runner with Zig 0.17.0. zmath's GitHub
      workflow (ubuntu/windows/macos runners, which the forge does not have) is
      gone; it never ran.
    Downloads