Sha256: 2b97916af7fd71cfee79fedade307ab11765e67167f49618eb40ad59b7dc586d
Contents?: true
Size: 591 Bytes
Versions: 14
Compression:
Stored size: 591 Bytes
Contents
/** Native method references. */ var floor = Math.floor; /* Native method references for those with the same name as other `lodash` methods. */ var nativeRandom = Math.random; /** * The base implementation of `_.random` without support for argument juggling * and returning floating-point numbers. * * @private * @param {number} min The minimum possible value. * @param {number} max The maximum possible value. * @returns {number} Returns the random number. */ function baseRandom(min, max) { return min + floor(nativeRandom() * (max - min + 1)); } module.exports = baseRandom;
Version data entries
14 entries across 7 versions & 1 rubygems