-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathmath.d.ts
More file actions
70 lines (64 loc) · 1.74 KB
/
Copy pathmath.d.ts
File metadata and controls
70 lines (64 loc) · 1.74 KB
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
66
67
68
69
70
export type bool = boolean;
export type float = number & { _opaque_float: 2 };
export type int = number & { _opaque_int: 1 } & float;
export type uint = number & { _opaque_uint: 1 };
type scalar = float | int | uint;
export type float2 = [float, float] & { _opaque_vector_float_2: 2; length: 2 };
export type float3 = [float, float, float] & {
_opaque_vector_float_3: 3;
length: 3;
};
export type float4 = [float, float, float, float] & {
_opaque_vector_float_4: 4;
length: 4;
};
export type int2 = [int, int] & { _opaque_vector_int_2: 2 } & float2;
export type int3 = [int, int, int] & { _opaque_vector_int_3: 3 } & float3;
export type int4 = [int, int, int, int] & { _opaque_vector_int_4: 4 } & float4;
export type uint2 = [uint, uint] & { _opaque_vector_uint_2: 2 } & float2;
export type uint3 = [uint, uint, uint] & { _opaque_vector_uint_3: 3 } & float3;
export type uint4 = [uint, uint, uint, uint] & {
_opaque_vector_uint_4: 4;
} & float4;
export type uint8 = number & { _opaque_uint8: 1 };
export interface float2x2
extends Omit<[float, float, float, float], "__index"> {
__matrix: 2;
[index: int]: float;
__index(index: number): [float, float];
}
export interface float3x3
extends Omit<
[float, float, float, float, float, float, float, float, float],
"__index"
> {
__matrix: 3;
[index: int]: float;
__index(index: number): [float, float, float];
}
export interface float4x4
extends Omit<
[
float,
float,
float,
float,
float,
float,
float,
float,
float,
float,
float,
float,
float,
float,
float,
float
],
"__index"
> {
__matrix: 4;
[index: int]: float;
__index(index: number): [float, float, float, float];
}