export class Mathm {
    static clamp(value, min, max) {
        return Math.min(Math.max(min, value), max);
    }

    static randomRange(min, max) {
        return min + (max - min) * Math.random();
    }
    static randomRangeInt(min, max) {
        return (min + (1 + max - min) * Math.random()) >> 0;
    }

    static randomChance(probability) {
        return Math.random() < probability;
    }
}