MCPcopy Create free account
hub / github.com/nodejs/node / randInt

Function randInt

deps/v8/tools/clusterfuzz/js_fuzzer/random.js:13–15  ·  view source on GitHub ↗
(min, max)

Source from the content-addressed store, hash-verified

11const assert = require('assert');
12
13function randInt(min, max) {
14 return Math.floor(Math.random() * (max - min + 1)) + min;
15}
16
17function choose(probability) {
18 return Math.random() < probability;

Callers 3

singleFunction · 0.70
sampleOfTwoFunction · 0.70
shuffleFunction · 0.70

Calls 1

randomMethod · 0.80

Tested by

no test coverage detected