forked from JaylyDev/ScriptAPI
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathVector.d.ts
More file actions
186 lines (186 loc) · 4.55 KB
/
Vector.d.ts
File metadata and controls
186 lines (186 loc) · 4.55 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
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
import { Vector3 } from "@minecraft/server";
/**
* Contains a description of a vector.
* @implements {Vector3}
*/
export declare class Vector {
/**
* X component of this vector.
* @type {number}
*/
x: number;
/**
* Y component of this vector.
* @type {number}
*/
y: number;
/**
* Z component of this vector.
* @type {number}
*/
z: number;
/**
* A constant vector that represents (0, 0, -1).
* @readonly
*/
static back: Vector;
/**
* A constant vector that represents (0, -1, 0).
* @readonly
*/
static down: Vector;
/**
* A constant vector that represents (0, 0, 1).
* @readonly
*/
static forward: Vector;
/**
* A constant vector that represents (-1, 0, 0).
* @readonly
*/
static left: Vector;
/**
* A constant vector that represents (1, 1, 1).
* @readonly
*/
static one: Vector;
/**
* A constant vector that represents (1, 0, 0).
* @readonly
*/
static right: Vector;
/**
* A constant vector that represents (0, 1, 0).
* @readonly
*/
static up: Vector;
/**
* A constant vector that represents (0, 0, 0).
* @readonly
*/
static zero: Vector;
/**
* @remarks
* Creates a new instance of an abstract vector.
* @param {number} x
* X component of the vector.
* @param {number} y
* Y component of the vector.
* @param {number} z
* Z component of the vector.
*/
constructor(x: number, y: number, z: number);
/**
* @remarks
* Compares this vector and another vector to one another.
* @param {Vector} other
* Other vector to compare this vector to.
* @returns {boolean}
* True if the two vectors are equal.
*/
equals(other: Vector): boolean;
/**
* @remarks
* Retur
* @returns {number}ns the length of this vector.
*/
length(): number;
/**
* @remarks
* Returns the
* @returns {number}squared length of this vector.
*/
lengthSquared(): number;
/**
* @remarks
* Returns this vector as a normalized vector.
* @returns {Vector}
*/
normalized(): Vector;
/**
* @remarks
* Returns the addition of these vectors.
* @param {Vector3} a
* @param {Vector3} b
* @returns {Vector}
*/
static add(a: Vector3, b: Vector3): Vector;
/**
* @remarks
* Returns the cross product of these two vectors.
* @param {Vector3} a
* @param {Vector3} b
* @returns {Vector}
*/
static cross(a: Vector3, b: Vector3): Vector;
/**
* @remarks
* Returns the distance between two vectors.
* @param {Vector3} a
* @param {Vector3} b
* @returns {number}
*/
static distance(a: Vector3, b: Vector3): number;
/**
* @remarks
* Returns the component-wise division of these vectors.
* @param {Vector3} a
* @param {Vector3 | number} b
* @returns {Vector}
*/
static divide(a: Vector3, b: Vector3 | number): Vector;
/**
* @remarks
* Returns the linear interpolation between a and b using t as
* the control.
* @param {Vector3} a
* @param {Vector3} b
* @param {number} t
* @returns {Vector}
*/
static lerp(a: Vector3, b: Vector3, t: number): Vector;
/**
* @remarks
* Returns a vector that is made from the largest components of
* two vectors.
* @param {Vector3} a
* @param {Vector3} b
* @returns {Vector}
*/
static max(a: Vector3, b: Vector3): Vector;
/**
* @remarks
* Returns a vector that is made from the smallest components
* of two vectors.
* @param {Vector3} a
* @param {Vector3} b
* @returns {Vector}
*/
static min(a: Vector3, b: Vector3): Vector;
/**
* @remarks
* Returns the component-wise product of these vectors.
* @param {Vector3} a
* @param {Vector3 | number} b
* @returns {Vector}
*/
static multiply(a: Vector3, b: Vector3 | number): Vector;
/**
* @remarks
* Returns the spherical linear interpolation between a and b
* using s as the control.
* @param {Vector3} a
* @param {Vector3} b
* @param {number} s
* @returns {Vector}
*/
static slerp(a: Vector3, b: Vector3, s: number): Vector;
/**
* @remarks
* Returns the subtraction of these vectors.
* @param {Vector3} a
* @param {Vector3} b
* @returns {Vector}
*/
static subtract(a: Vector3, b: Vector3): Vector;
}