UNPKG

ant-utils

Version:
15 lines 389 B
/** * Random with Decimal * * @export * @param {Decimal} [min=new Decimal(0)] * @param {Decimal} [max=new Decimal(1)] * @returns * @requires Decimal */ export function random(min, max) { if (min === void 0) { min = new Decimal(0); } if (max === void 0) { max = new Decimal(1); } return min.plus(max.minus(min).times(Math.random())); } //# sourceMappingURL=random.js.map