-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.d.ts
65 lines (65 loc) · 2.4 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
interface Math {
clamp(x: number, min: number, max: number): number;
clamp01(x: number): number;
truncated(x: number, digits: number): number;
cycle(x: number, length: number): number;
randomInt(min: number, max: number): number;
randomFloat(min: number, max: number): number;
average(array: number[]): number;
sum(array: number[]): number;
multiply(x: number, array: number[]): number[];
operations(fns: Function[], array: number[]): number[];
operation(fns: Function[], x: number): number;
lerp(start: number, end: number, amount: number): number;
normalize(x: number, min: number, max: number): number;
normalize01(x: number, min: number, max: number): number;
factorial(n: number): number;
fib(n: number): number;
square(n: number): number;
cube(n: number): number;
not(n: number): number;
getBaseLog(x: number, y: number): number;
multiply(x: number, y: number): number;
divide(x: number, y: number): number;
inRange(value: number, min: number, max: number): boolean;
lt(x: number, y: number): boolean;
lte(x: number, y: number): boolean;
gt(x: number, y: number): boolean;
gte(x: number, y: number): boolean;
add(x: number, y: number): number;
subtract(x: number, y: number): number;
lcm(x: number, y: number): number;
lcd(x: number, y: number): number;
hcf(x: number, y: number): number;
gcd(x: number, y: number): number;
toRadians(degress: number): number;
toDegrees(radians: number): number;
sqr(x: number): number;
isInt(x: number): boolean;
isFloat(x: number): boolean;
isEven(x: number): boolean;
isOdd(x: number): boolean;
isNumber(x: number): boolean;
isNegative(x: number): boolean;
isPositive(x: number): boolean;
isZero(x: number): boolean;
isNonZero(x: number): boolean;
randomBoolean(): boolean;
ctg(x: number): number;
actg(x: number): number;
round5(x: number): number;
roundN(x: number, y: number): number;
roundGauss(x: number, decimal: number): number;
copysign(x: number, y: number): number;
unique(array: number[]): number[];
difference(x: number, y: number): number;
repeat(x: number, y: number): number;
// Bitwise functions
bitAnd(x: number, y: number): number;
bitNot(x: number): number;
bitOr(x: number, y: number): number;
bitXor(x: number, y: number): number;
leftShift(x: number, y: number): number;
rightArithShift(x: number, y: number): number;
rightLogShift(x: number, y: number): number;
}