"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.MAX_DURATION = exports.MIN_DURATION = exports.baseDuration = exports.between = exports.mapRange = void 0;
const mapRange = (num, inMin, inMax, outMin, outMax) => {
    return ((num - inMin) * (outMax - outMin)) / (inMax - inMin) + outMin;
};
exports.mapRange = mapRange;
const between = (num, min, max) => {
    return Math.min(Math.max(num, min), max);
};
exports.between = between;
const baseDuration = (message, min, max) => (0, exports.between)((0, exports.mapRange)(Math.log(message.record.text.length) * 8, 1, 16, min, max), min, max);
exports.baseDuration = baseDuration;
exports.MIN_DURATION = 6000;
exports.MAX_DURATION = 12000;
//# sourceMappingURL=math.js.map