Initial commit
[yaffs-website] / node_modules / grunt-contrib-watch / node_modules / lodash / internal / baseRandom.js
1 /* Native method references for those with the same name as other `lodash` methods. */
2 var nativeFloor = Math.floor,
3     nativeRandom = Math.random;
4
5 /**
6  * The base implementation of `_.random` without support for argument juggling
7  * and returning floating-point numbers.
8  *
9  * @private
10  * @param {number} min The minimum possible value.
11  * @param {number} max The maximum possible value.
12  * @returns {number} Returns the random number.
13  */
14 function baseRandom(min, max) {
15   return min + nativeFloor(nativeRandom() * (max - min + 1));
16 }
17
18 module.exports = baseRandom;