MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / mulberry32

Function mulberry32

scripts/seed-events.mjs:44–52  ·  view source on GitHub ↗
(seed)

Source from the content-addressed store, hash-verified

42// ---------------------------------------------------------------------------
43
44function 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)
55const eventRng = Math.random.bind(Math);

Callers 1

buildSessionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected