mirror of
https://github.com/whoisclebs/lodash.git
synced 2026-02-04 00:57:48 +00:00
Eslint cleanup (imports left), except template.
This commit is contained in:
@@ -73,7 +73,8 @@ function random(lower, upper, floating) {
|
||||
}
|
||||
if (floating || lower % 1 || upper % 1) {
|
||||
const rand = nativeRandom()
|
||||
return nativeMin(lower + (rand * (upper - lower + freeParseFloat('1e-' + ((rand + '').length - 1)))), upper)
|
||||
const randLength = `${ rand }`.length - 1
|
||||
return nativeMin(lower + (rand * (upper - lower + freeParseFloat(`1e-${ randLength }`)), upper))
|
||||
}
|
||||
return lower + nativeFloor(nativeRandom() * (upper - lower + 1))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user