cleanup wp
This commit is contained in:
parent
788df7773c
commit
672767a31e
2 changed files with 18 additions and 50 deletions
12
util/Mathf.ts
Normal file
12
util/Mathf.ts
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
export const Mathf = {
|
||||
clamp: (value: number, min: number, max: number) => {
|
||||
if (value < min) return min;
|
||||
if (value > max) return max;
|
||||
return value;
|
||||
},
|
||||
sign: (value: number) => {
|
||||
if (value > 0) return 1;
|
||||
if (value < 0) return -1;
|
||||
return 0;
|
||||
},
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue