(seed)
| 42 | // --------------------------------------------------------------------------- |
| 43 | |
| 44 | function mulberry32(seed) { |
| 45 | return function () { |
| 46 | seed |= 0; |
| 47 | seed = (seed + 0x6d2b79f5) | 0; |
| 48 | let t = Math.imul(seed ^ (seed >>> 15), 1 | seed); |
| 49 | t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t; |
| 50 | return ((t ^ (t >>> 14)) >>> 0) / 4294967296; |
| 51 | }; |
| 52 | } |
| 53 | |
| 54 | // Non-deterministic random for events (differs on each run) |
| 55 | const eventRng = Math.random.bind(Math); |