mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-01 23:57:49 +00:00
Bump to v3.10.0.
This commit is contained in:
@@ -1,8 +1,6 @@
|
||||
/** Native method references. */
|
||||
var floor = Math.floor;
|
||||
|
||||
/* Native method references for those with the same name as other `lodash` methods. */
|
||||
var nativeRandom = Math.random;
|
||||
var nativeFloor = Math.floor,
|
||||
nativeRandom = Math.random;
|
||||
|
||||
/**
|
||||
* The base implementation of `_.random` without support for argument juggling
|
||||
@@ -14,7 +12,7 @@ var nativeRandom = Math.random;
|
||||
* @returns {number} Returns the random number.
|
||||
*/
|
||||
function baseRandom(min, max) {
|
||||
return min + floor(nativeRandom() * (max - min + 1));
|
||||
return min + nativeFloor(nativeRandom() * (max - min + 1));
|
||||
}
|
||||
|
||||
export default baseRandom;
|
||||
|
||||
Reference in New Issue
Block a user