time for a snapshot

This commit is contained in:
Schluffe
2026-07-11 17:48:28 +02:00
parent 135b7c3042
commit 7262752e16
47 changed files with 1712 additions and 61 deletions
+9
View File
@@ -0,0 +1,9 @@
import { add, scale, type Vec } from "./given.ts";
/**
* Advance a position by a velocity over `delta` milliseconds.
* newPosition = position + velocity * delta
*/
export function integrate(pos: Vec, vel: Vec, delta: number): Vec {
return add(pos, scale(vel, delta));
}