X-Git-Url: http://www.aleph1.co.uk/gitweb/?a=blobdiff_plain;ds=sidebyside;f=node_modules%2Fgrunt-uncss%2Fnode_modules%2Flodash%2F_baseRandom.js;fp=node_modules%2Fgrunt-uncss%2Fnode_modules%2Flodash%2F_baseRandom.js;h=94f76a76636764a0571af25d4d9af814c7c3eb10;hb=a2bd1bf0c2c1f1a17d188f4dc0726a45494cefae;hp=0000000000000000000000000000000000000000;hpb=57c063afa3f66b07c4bbddc2d6129a96d90f0aad;p=yaffs-website diff --git a/node_modules/grunt-uncss/node_modules/lodash/_baseRandom.js b/node_modules/grunt-uncss/node_modules/lodash/_baseRandom.js new file mode 100644 index 000000000..94f76a766 --- /dev/null +++ b/node_modules/grunt-uncss/node_modules/lodash/_baseRandom.js @@ -0,0 +1,18 @@ +/* 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;