time for a snapshot
This commit is contained in:
@@ -0,0 +1,8 @@
|
||||
// Finished in earlier steps.
|
||||
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 scale = (a: Vec, s: number): Vec => ({ x: a.x * s, y: a.y * s });
|
||||
|
||||
/** From step 06/07. */
|
||||
export type Hit = { time: number; normal: Vec };
|
||||
Reference in New Issue
Block a user