breakout71/src/pure_functions.ts
Renan LE CARO 27a2cd686e Build
2025-03-29 21:28:05 +01:00

7 lines
217 B
TypeScript

export function clamp(value: number, min: number, max: number) {
return Math.max(min, Math.min(value, max));
}
export function comboKeepingRate(level: number) {
return clamp(1 - (1 / (1 + level)) * 1.5, 0, 1);
}