(seed: number)
| 14 | |
| 15 | // Mulberry32 — tiny seeded PRNG, good enough for picking ducks |
| 16 | function mulberry32(seed: number): () => number { |
| 17 | let a = seed >>> 0 |
| 18 | return function () { |
| 19 | a |= 0 |
| 20 | a = (a + 0x6d2b79f5) | 0 |
| 21 | let t = Math.imul(a ^ (a >>> 15), 1 | a) |
| 22 | t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t |
| 23 | return ((t ^ (t >>> 14)) >>> 0) / 4294967296 |
| 24 | } |
| 25 | } |
| 26 | |
| 27 | function hashString(s: string): number { |
| 28 | if (typeof Bun !== 'undefined') { |
no outgoing calls
no test coverage detected