"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.randomBetween = randomBetween;
exports.randomIntegerBetween = randomIntegerBetween;
exports.randomMatrix = randomMatrix;
exports.chance = chance;
function randomBetween(a, b) {
    return a + (b - a) * Math.random();
}
function randomIntegerBetween(a, b) {
    return Math.floor(randomBetween(a, b));
}
function randomMatrix(rows, columns, generator) {
    const matrix = [];
    for (let i = 0; i < rows; i++) {
        matrix[i] = [];
        for (let j = 0; j < columns; j++) {
            matrix[i][j] = generator(i, j);
        }
    }
    return matrix;
}
function chance(chance = 0.5) {
    return Math.random() <= chance;
}
//# sourceMappingURL=math.js.map