time for a snapshot

This commit is contained in:
Schluffe committed 2026-07-11 17:48:28 +02:00
1 parent 135b7c3042
commit 7262752e16
47 files changed
+1712 -61

No files matched your search

@@ -0,0 +1,6 @@
// Finished in step 01 — provided so you only implement the new ideas here.
export type Vec = { x: number; y: number };
export const vec = (x: number, y: number): Vec => ({ x, y });
export const add = (a: Vec, b: Vec): Vec => ({ x: a.x + b.x, y: a.y + b.y });
export const sub = (a: Vec, b: Vec): Vec => ({ x: a.x - b.x, y: a.y - b.y });
export const scale = (a: Vec, s: number): Vec => ({ x: a.x * s, y: a.y * s });