From fcfa3a0d80a5f393b7e49e8230bf54923a9c9d70 Mon Sep 17 00:00:00 2001 From: sjat Date: Thu, 11 Jun 2026 09:21:04 +0200 Subject: [PATCH] test: tighten barrel regression guard to a hard near-exact bound --- src/geometry/polywarp.test.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/geometry/polywarp.test.ts b/src/geometry/polywarp.test.ts index 7f88b22..ccab70a 100644 --- a/src/geometry/polywarp.test.ts +++ b/src/geometry/polywarp.test.ts @@ -45,7 +45,8 @@ describe('polywarp', () => { const test: Vec2[] = [[488, 244], [1464, 732], [1952, 488], [976, 976]]; const polyMax = Math.max(...test.map((m) => dist(applyPolyWarp(w, m), trueMap(m)))); const homoMax = Math.max(...test.map((m) => dist(applyHomography(H, m), trueMap(m)))); - expect(polyMax).toBeLessThan(homoMax * 0.05); + expect(homoMax).toBeGreaterThan(1e-3); // homography genuinely fails on barrel data + expect(polyMax).toBeLessThan(1e-6); // degree-3 fit of cubic data is near-exact everywhere }); it('inverse round-trips machine points within a small tolerance', () => {