Urara-Blog/node_modules/.pnpm-store/v3/files/56/1b9763b72fe06191fb4e058d3f6a843e6d1ba759b1b5e70c78754a2db5b64fd03fe378f606c61025d5c8c4d07f5176faf7d1dc3d336b89065574d50f6215f0
2022-08-14 01:14:53 +08:00

18 lines
541 B
Text

/* Built-in method references for those with the same name as other `lodash` methods. */
var nativeFloor = Math.floor,
nativeRandom = Math.random;
/**
* The base implementation of `_.random` without support for returning
* floating-point numbers.
*
* @private
* @param {number} lower The lower bound.
* @param {number} upper The upper bound.
* @returns {number} Returns the random number.
*/
function baseRandom(lower, upper) {
return lower + nativeFloor(nativeRandom() * (upper - lower + 1));
}
module.exports = baseRandom;