0
0
GGGiovanny Gongora
Clamps num within the inclusive range specified by the boundary values a and b.
const clampNumber = (num: number, a: number, b: number) =>
Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));
0
0
GGGiovanny Gongora
Clamps num within the inclusive range specified by the boundary values a and b.
const clampNumber = (num: number, a: number, b: number) =>
Math.max(Math.min(num, Math.max(a, b)), Math.min(a, b));