Skip to content

@temporary-escape/mod-sdk / Vector2b

Class: Vector2b ​

Defined in: math/vector2b.ts:2

Constructors ​

Constructor ​

ts
new Vector2b(x?: boolean, y?: boolean): Vector2b;

Defined in: math/vector2b.ts:6

Parameters ​

ParameterTypeDefault value
xbooleanfalse
ybooleanx

Returns ​

Vector2b

Properties ​

PropertyTypeDefined in
xbooleanmath/vector2b.ts:3
ybooleanmath/vector2b.ts:4

Methods ​

get() ​

ts
get(i: number): boolean;

Defined in: math/vector2b.ts:15

Get an axis from the vector.

Parameters ​

ParameterTypeDescription
inumberAxis index in range [0, 1].

Returns ​

boolean


set() ​

ts
set(i: number, v: boolean): void;

Defined in: math/vector2b.ts:24

Set an axis value to the vector.

Parameters ​

ParameterTypeDescription
inumberAxis index in range [0, 1].
vbooleanAxis value.

Returns ​

void


toString() ​

ts
toString(): string;

Defined in: math/vector2b.ts:32

Returns ​

string


add() ​

ts
static add(a: Vector2b, b: Vector2b): Vector2b;

Defined in: math/vector2b.ts:46

Returns addition of two vectors.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

Vector2b


all() ​

ts
static all(a: Vector2b): boolean;

Defined in: math/vector2b.ts:109

Returns true if all components of x are true.

Parameters ​

ParameterType
aVector2b

Returns ​

boolean


any() ​

ts
static any(a: Vector2b): boolean;

Defined in: math/vector2b.ts:102

Returns true if any component of x is true.

Parameters ​

ParameterType
aVector2b

Returns ​

boolean


cmpEqual() ​

ts
static cmpEqual(a: Vector2b, b: Vector2b): Vector2b;

Defined in: math/vector2b.ts:88

Component-wise comparison of two vectors.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

Vector2b


cmpNotEqual() ​

ts
static cmpNotEqual(a: Vector2b, b: Vector2b): Vector2b;

Defined in: math/vector2b.ts:95

Component-wise comparison of two vectors.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

Vector2b


div() ​

ts
static div(a: Vector2b, b: Vector2b): Vector2b;

Defined in: math/vector2b.ts:67

Returns division of two vectors.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

Vector2b


eq() ​

ts
static eq(a: Vector2b, b: Vector2b): boolean;

Defined in: math/vector2b.ts:74

Returns true if two vectors are equal.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

boolean


mul() ​

ts
static mul(a: Vector2b, b: Vector2b): Vector2b;

Defined in: math/vector2b.ts:60

Returns multiplication of two vectors.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

Vector2b


ne() ​

ts
static ne(a: Vector2b, b: Vector2b): boolean;

Defined in: math/vector2b.ts:81

Returns true if two vectors are not equal.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

boolean


sub() ​

ts
static sub(a: Vector2b, b: Vector2b): Vector2b;

Defined in: math/vector2b.ts:53

Returns subtraction of two vectors.

Parameters ​

ParameterType
aVector2b
bVector2b

Returns ​

Vector2b


unm() ​

ts
static unm(a: Vector2b): Vector2b;

Defined in: math/vector2b.ts:39

Returns the negation of the vector.

Parameters ​

ParameterType
aVector2b

Returns ​

Vector2b