MCPcopy
hub / github.com/fent/randexp.js / randInt

Method randInt

lib/randexp.js:210–212  ·  view source on GitHub ↗

* Randomly generates and returns a number between a and b (inclusive). * * @param {Number} a * @param {Number} b * @return {Number}

(a, b)

Source from the content-addressed store, hash-verified

208 * @return {Number}
209 */
210 randInt(a, b) {
211 return a + Math.floor(Math.random() * (1 + b - a));
212 }
213
214
215 /**

Callers 3

_genMethod · 0.95
_randBoolMethod · 0.95
_randSelectMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected