@untemps/utils 3.1.0 → 3.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1 +1 @@
|
|
|
1
|
-
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./normalizeMinMax.cjs`);var t=(t=-(2**53-1),n=2**53-1)=>{let{min:r,max:i}=e.normalizeMinMax(t,n);return Math.
|
|
1
|
+
Object.defineProperty(exports,Symbol.toStringTag,{value:`Module`});const e=require(`./normalizeMinMax.cjs`);var t=(t=-(2**53-1),n=2**53-1)=>{let{min:r,max:i}=e.normalizeMinMax(t,n);return Math.floor(r+Math.random()*(i-r+1))};exports.getRandomInteger=t;
|
|
@@ -2,7 +2,7 @@ import { normalizeMinMax as e } from "./normalizeMinMax.js";
|
|
|
2
2
|
//#region src/number/getRandomInteger.ts
|
|
3
3
|
var t = (t = -(2 ** 53 - 1), n = 2 ** 53 - 1) => {
|
|
4
4
|
let { min: r, max: i } = e(t, n);
|
|
5
|
-
return Math.
|
|
5
|
+
return Math.floor(r + Math.random() * (i - r + 1));
|
|
6
6
|
};
|
|
7
7
|
//#endregion
|
|
8
8
|
export { t as getRandomInteger };
|