(condition: unknown, message: string)
| 7 | // Intent: validate that 100K -> 1K LTTB downsampling preserves peaks/valleys. |
| 8 | |
| 9 | const assert = (condition: unknown, message: string): void => { |
| 10 | if (!condition) throw new Error(message); |
| 11 | }; |
| 12 | |
| 13 | // Small deterministic PRNG (Mulberry32). |
| 14 | function mulberry32(seed: number): () => number { |