@temporary-escape/mod-sdk / Vector4b
Class: Vector4b
Defined in: math/vector4b.ts:5
Constructors
Constructor
ts
new Vector4b(
x?: boolean,
y?: boolean,
z?: boolean,
w?: boolean
): Vector4b;Defined in: math/vector4b.ts:11
Parameters
| Parameter | Type | Default value |
|---|---|---|
x | boolean | false |
y | boolean | x |
z | boolean | x |
w | boolean | x |
Returns
Vector4b
Properties
| Property | Type | Defined in |
|---|---|---|
w | boolean | math/vector4b.ts:9 |
x | boolean | math/vector4b.ts:6 |
y | boolean | math/vector4b.ts:7 |
z | boolean | math/vector4b.ts:8 |
Methods
get()
ts
get(i: number): boolean;Defined in: math/vector4b.ts:40
Get an axis from the vector.
Parameters
| Parameter | Type | Description |
|---|---|---|
i | number | Axis index in range [0, 3]. |
Returns
boolean
set()
ts
set(i: number, v: boolean): void;Defined in: math/vector4b.ts:49
Set an axis value to the vector.
Parameters
| Parameter | Type | Description |
|---|---|---|
i | number | Axis index in range [0, 3]. |
v | boolean | Axis value. |
Returns
void
toString()
ts
toString(): string;Defined in: math/vector4b.ts:18
Returns
string
xy()
ts
xy(): Vector2b;Defined in: math/vector4b.ts:25
Returns a vector containing the x and y components of this vector.
Returns
xyz()
ts
xyz(): Vector3b;Defined in: math/vector4b.ts:32
Returns a vector containing the x, y and z components of this vector.
Returns
add()
ts
static add(a: Vector4b, b: Vector4b): Vector4b;Defined in: math/vector4b.ts:71
Returns addition of two vectors.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
Vector4b
all()
ts
static all(a: Vector4b): boolean;Defined in: math/vector4b.ts:134
Returns true if all components of x are true.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
Returns
boolean
any()
ts
static any(a: Vector4b): boolean;Defined in: math/vector4b.ts:127
Returns true if any component of x is true.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
Returns
boolean
cmpEqual()
ts
static cmpEqual(a: Vector4b, b: Vector4b): Vector4b;Defined in: math/vector4b.ts:113
Component-wise comparison of two vectors.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
Vector4b
cmpNotEqual()
ts
static cmpNotEqual(a: Vector4b, b: Vector4b): Vector4b;Defined in: math/vector4b.ts:120
Component-wise comparison of two vectors.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
Vector4b
div()
ts
static div(a: Vector4b, b: Vector4b): Vector4b;Defined in: math/vector4b.ts:92
Returns division of two vectors.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
Vector4b
eq()
ts
static eq(a: Vector4b, b: Vector4b): boolean;Defined in: math/vector4b.ts:99
Returns true if two vectors are equal.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
boolean
mul()
ts
static mul(a: Vector4b, b: Vector4b): Vector4b;Defined in: math/vector4b.ts:85
Returns multiplication of two vectors.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
Vector4b
ne()
ts
static ne(a: Vector4b, b: Vector4b): boolean;Defined in: math/vector4b.ts:106
Returns true if two vectors are not equal.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
boolean
sub()
ts
static sub(a: Vector4b, b: Vector4b): Vector4b;Defined in: math/vector4b.ts:78
Returns subtraction of two vectors.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
b | Vector4b |
Returns
Vector4b
unm()
ts
static unm(a: Vector4b): Vector4b;Defined in: math/vector4b.ts:64
Returns the negation of the vector.
Parameters
| Parameter | Type |
|---|---|
a | Vector4b |
Returns
Vector4b
