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

Function randomUniform

external/.d3.js:14446–14454  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

14444
14445var uniform = (function sourceRandomUniform(source) {
14446 function randomUniform(min, max) {
14447 min = min == null ? 0 : +min;
14448 max = max == null ? 1 : +max;
14449 if (arguments.length === 1) max = min, min = 0;
14450 else max -= min;
14451 return function() {
14452 return source() * max + min;
14453 };
14454 }
14455
14456 randomUniform.source = sourceRandomUniform;
14457

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected