securityos/node_modules/pure-rand/lib/distribution/UniformIntDistribution.js

16 lines
626 B
JavaScript
Raw Normal View History

2024-09-06 15:32:35 +00:00
"use strict";
exports.__esModule = true;
exports.uniformIntDistribution = void 0;
var UnsafeUniformIntDistribution_1 = require("./UnsafeUniformIntDistribution");
function uniformIntDistribution(from, to, rng) {
if (rng != null) {
var nextRng = rng.clone();
return [(0, UnsafeUniformIntDistribution_1.unsafeUniformIntDistribution)(from, to, nextRng), nextRng];
}
return function (rng) {
var nextRng = rng.clone();
return [(0, UnsafeUniformIntDistribution_1.unsafeUniformIntDistribution)(from, to, nextRng), nextRng];
};
}
exports.uniformIntDistribution = uniformIntDistribution;