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

Function randomInt

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

Source from the content-addressed store, hash-verified

14460
14461var int = (function sourceRandomInt(source) {
14462 function randomInt(min, max) {
14463 if (arguments.length < 2) max = min, min = 0;
14464 min = Math.floor(min);
14465 max = Math.floor(max) - min;
14466 return function() {
14467 return Math.floor(source() * max + min);
14468 };
14469 }
14470
14471 randomInt.source = sourceRandomInt;
14472

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected