@appolo/utils
Advanced tools
Comparing version 8.0.56 to 8.0.57
@@ -14,3 +14,3 @@ "use strict"; | ||
} | ||
let isInt = !floating && Number.isInteger(min) && Number.isInteger(min); | ||
let isInt = !floating && Number.isInteger(min) && Number.isInteger(max); | ||
if (isInt) { | ||
@@ -20,4 +20,4 @@ return Numbers.randomInt(min, max); | ||
min = Math.min(min, max); | ||
max = Math.max(max, max); | ||
return (Math.random() * (max - min + 1)) + min; | ||
max = Math.max(min, max); | ||
return (Math.random() * (max - min)) + min; | ||
} | ||
@@ -24,0 +24,0 @@ static isNumber(str) { |
@@ -14,3 +14,3 @@ export class Numbers { | ||
let isInt = !floating && Number.isInteger(min) && Number.isInteger(min); | ||
let isInt = !floating && Number.isInteger(min) && Number.isInteger(max); | ||
@@ -22,4 +22,4 @@ if (isInt) { | ||
min = Math.min(min, max); | ||
max = Math.max(max, max); | ||
return (Math.random() * (max - min + 1)) + min; | ||
max = Math.max(min, max); | ||
return (Math.random() * (max - min)) + min; | ||
} | ||
@@ -26,0 +26,0 @@ |
@@ -20,3 +20,3 @@ { | ||
"main": "./index.js", | ||
"version": "8.0.56", | ||
"version": "8.0.57", | ||
"license": "MIT", | ||
@@ -23,0 +23,0 @@ "repository": { |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
277889