3 lines
101 B
TypeScript
3 lines
101 B
TypeScript
|
export const clamp = (num: number, min: number, max: number) =>
|
||
|
Math.min(Math.max(num, min), max);
|