Add glMatrix
This commit is contained in:
parent
582979d3ed
commit
e88b4589d2
1 changed files with 212 additions and 359 deletions
4
frontend/src/scripts/helper/clamp.ts
Normal file
4
frontend/src/scripts/helper/clamp.ts
Normal file
|
|
@ -0,0 +1,4 @@
|
|||
export const clamp = (value: number, min: number, max: number): number =>
|
||||
Math.min(max, Math.max(min, value));
|
||||
|
||||
export const clamp01 = (value: number): number => clamp(value, 0, 1);
|
||||
Loading…
Reference in a new issue