MCPcopy Create free account
hub / github.com/cortex-js/compute-engine / mulberry32

Function mulberry32

scripts/rubi/triage-ch6.ts:21–30  ·  view source on GitHub ↗
(seed: number)

Source from the content-addressed store, hash-verified

19import { RubiDriver } from '../../src/compute-engine/rubi/driver';
20
21function mulberry32(seed: number): () => number {
22 let a = seed >>> 0;
23 return () => {
24 a |= 0;
25 a = (a + 0x6d2b79f5) | 0;
26 let t = Math.imul(a ^ (a >>> 15), 1 | a);
27 t = (t + Math.imul(t ^ (t >>> 7), 61 | t)) ^ t;
28 return ((t ^ (t >>> 14)) >>> 0) / 4294967296;
29 };
30}
31
32function main() {
33 const argv = process.argv;

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected