mirror of
https://github.com/OpenCut-app/OpenCut.git
synced 2026-07-13 21:52:53 +02:00
12 lines
153 B
TypeScript
12 lines
153 B
TypeScript
export function clamp({
|
|
value,
|
|
min,
|
|
max,
|
|
}: {
|
|
value: number;
|
|
min: number;
|
|
max: number;
|
|
}): number {
|
|
return Math.max(min, Math.min(max, value));
|
|
}
|