Eslint cleanup (imports left), except template.

This commit is contained in:
Michał Lipiński
2017-02-17 23:22:07 +01:00
parent 753e47de13
commit 16413cc32a
6 changed files with 11 additions and 11 deletions

View File

@@ -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))
}