Progressing on profile edition and thumbnail cropping

This commit is contained in:
2024-09-11 17:47:04 +02:00
parent e904f28b3b
commit 6856d3b9af
25 changed files with 278 additions and 88 deletions

View File

@@ -32,4 +32,11 @@ export function format(date: Date, template: string): string
}
return template;
}
export function clamp(x: number, min: number, max: number): number {
if (x > max)
return max;
if (x < min)
return min;
return x;
}