MCPcopy Create free account
hub / github.com/breck7/scroll / lcg

Function lcg

external/.d3.js:14767–14770  ·  view source on GitHub ↗
(seed = Math.random())

Source from the content-addressed store, hash-verified

14765const eps = 1 / 0x100000000;
14766
14767function lcg(seed = Math.random()) {
14768 let state = (0 <= seed && seed < 1 ? seed / eps : Math.abs(seed)) | 0;
14769 return () => (state = mul * state + inc | 0, eps * (state >>> 0));
14770}
14771
14772function initRange(domain, range) {
14773 switch (arguments.length) {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected