MCPcopy Index your code
hub / github.com/ChartGPU/ChartGPU / rand01

Function rand01

examples/million-points/main.ts:81–87  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

79 // xorshift32 PRNG (deterministic, no allocations).
80 let state = 0x12345678 | 0;
81 const rand01 = (): number => {
82 state ^= state << 13;
83 state ^= state >>> 17;
84 state ^= state << 5;
85 // Convert to [0, 1).
86 return (state >>> 0) / 4294967296;
87 };
88
89 let yMin = Number.POSITIVE_INFINITY;
90 let yMax = Number.NEGATIVE_INFINITY;

Callers 1

createMillionPointsDataFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected