feat: move functions to separate files

This commit is contained in:
Ilia Mashkov
2026-01-07 16:48:49 +03:00
parent 2c4bfaba41
commit f7b19bd97f
3 changed files with 51 additions and 0 deletions

View File

@@ -0,0 +1,10 @@
/**
* Clamp a number within a range.
* @param value The number to clamp.
* @param min minimum value
* @param max maximum value
* @returns The clamped number.
*/
export function clampNumber(value: number, min: number, max: number): number {
return Math.min(Math.max(value, min), max);
}