From c411edb7c160c55e94fddf62fd60fa1e166351c0 Mon Sep 17 00:00:00 2001 From: Maze Winther Date: Mon, 6 Apr 2026 12:59:07 +0200 Subject: fix: clean up --- apps/web/src/lib/animation/bezier.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'apps/web/src/lib/animation/bezier.ts') diff --git a/apps/web/src/lib/animation/bezier.ts b/apps/web/src/lib/animation/bezier.ts index 4dce027e..5a9758ed 100644 --- a/apps/web/src/lib/animation/bezier.ts +++ b/apps/web/src/lib/animation/bezier.ts @@ -1,5 +1,7 @@ import type { ScalarAnimationKey } from "@/lib/animation/types"; +const BEZIER_SOLVE_ITERATIONS = 20; + export function getBezierPoint({ progress, p0, @@ -68,7 +70,7 @@ export function solveBezierProgressForTime({ const leftHandle = rightKey.leftHandle ?? getDefaultLeftHandle({ leftKey, rightKey }); - for (let iteration = 0; iteration < 20; iteration++) { + for (let iteration = 0; iteration < BEZIER_SOLVE_ITERATIONS; iteration++) { const mid = (lower + upper) / 2; const estimate = getBezierPoint({ progress: mid, -- cgit v1.3.1