@lazy-random/util-distributions
Version:
27 lines (26 loc) • 876 B
JavaScript
!function(n, e) {
"object" == typeof exports && "undefined" != typeof module ? e(exports) : "function" == typeof define && define.amd ? define([ "exports" ], e) : e((n = "undefined" != typeof globalThis ? globalThis : n || self).LazyRandomUtilDistributions = {});
}(this, (function(n) {
"use strict";
function randIndex(n, e) {
return Math.floor(n.next() * e);
}
function randIndexWithRange(n, e, t) {
return Math.floor(float(n, e, t));
}
function float(n, e, t) {
return n.next() * (t - e) + e;
}
function int(n, e, t) {
return randIndexWithRange(n, e, t + 1);
}
n.default = {
randIndex,
float,
int
}, n.float = float, n.int = int, n.randIndex = randIndex, n.randIndexWithRange = randIndexWithRange,
Object.defineProperty(n, "__esModule", {
value: !0
});
}));
//# sourceMappingURL=index.umd.production.min.cjs.map