zenno: use a real last spurt phase

This commit is contained in:
2026-10-10 13:37:12 -04:00
parent 3a39794312
commit cf301745f1
4 changed files with 67 additions and 63 deletions
+2 -2
View File
@@ -99,8 +99,8 @@
const distance = $derived([last(seggs[0]).end.x, last(seggs[1]).end.x] as const);
const time = $derived([last(seggs[0]).end.t, last(seggs[1]).end.t] as const);
const finishTime = $derived([
time[0] + (phases[race.Phase.LateRace] - distance[0]) / spurtSpeed,
time[1] + (phases[race.Phase.LateRace] - distance[1]) / spurtSpeed,
time[0] + (raceLen - distance[0]) / spurtSpeed,
time[1] + (raceLen - distance[1]) / spurtSpeed,
] as const);
function gainLengths(fast: accel.Instant, slow: accel.Instant): number {
const m = fast.v * (slow.t - fast.t) + fast.x - slow.x;