CLASSES
TagsA - Z

Vector4

Objects

Description

class Vector4

Constructor

new Vector4(x, y, z, w)

Parameters

Name Type Description
x number
y number
z number

Members

x : number

y : number

z : number

w : number

Methods

toString() → string

getClassName() → string

getHashCode() → number

asArray() → number[]

toArray(array, index) → Vector4

Parameters

Name Type Description
array number[]
optional index number

addInPlace(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

add(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

addToRef(otherVector, result) → Vector4

Parameters

Name Type Description
otherVector Vector4
result Vector4

subtractInPlace(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

subtract(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

subtractToRef(otherVector, result) → Vector4

Parameters

Name Type Description
otherVector Vector4
result Vector4

subtractFromFloats(x, y, z, w) → Vector4

Parameters

Name Type Description
x number
y number
z number

subtractFromFloatsToRef(x, y, z, w, result) → Vector4

Parameters

Name Type Description
x number
y number
z number
w number

negate() → Vector4

scaleInPlace(scale) → Vector4

Parameters

Name Type Description
scale number

scale(scale) → Vector4

Parameters

Name Type Description
scale number

scaleToRef(scale, result) → void

Parameters

Name Type Description
scale number
result Vector4

equals(otherVector) → boolean

Parameters

Name Type Description
otherVector Vector4

equalsWithEpsilon(otherVector, epsilon) → boolean

Parameters

Name Type Description
otherVector Vector4
optional epsilon number

equalsToFloats(x, y, z, w) → boolean

Parameters

Name Type Description
x number
y number
z number

multiplyInPlace(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

multiply(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

multiplyToRef(otherVector, result) → Vector4

Parameters

Name Type Description
otherVector Vector4
result Vector4

multiplyByFloats(x, y, z, w) → Vector4

Parameters

Name Type Description
x number
y number
z number

divide(otherVector) → Vector4

Parameters

Name Type Description
otherVector Vector4

divideToRef(otherVector, result) → Vector4

Parameters

Name Type Description
otherVector Vector4
result Vector4

MinimizeInPlace(other) → Vector4

Parameters

Name Type Description
other Vector4

MaximizeInPlace(other) → Vector4

Parameters

Name Type Description
other Vector4

length() → number

lengthSquared() → number

normalize() → Vector4

toVector3() → Vector3

clone() → Vector4

copyFrom(source) → Vector4

Parameters

Name Type Description
source Vector4

copyFromFloats(x, y, z, w) → Vector4

Parameters

Name Type Description
x number
y number
z number

static FromArray(array, offset) → Vector4

Parameters

Name Type Description
array number[]
optional offset number

static FromArrayToRef(array, offset, result) → void

Parameters

Name Type Description
array number[]
offset number
result Vector4

static FromFloatArrayToRef(array, offset, result) → void

Parameters

Name Type Description
array Float32Array
offset number
result Vector4

static FromFloatsToRef(x, y, z, w, result) → void

Parameters

Name Type Description
x number
y number
z number
w number

static Zero() → Vector4

static Normalize(vector) → Vector4

Parameters

Name Type Description
vector Vector4

static NormalizeToRef(vector, result) → void

Parameters

Name Type Description
vector Vector4
result Vector4

static Minimize(left, right) → Vector4

Parameters

Name Type Description
left Vector4
right Vector4

static Maximize(left, right) → Vector4

Parameters

Name Type Description
left Vector4
right Vector4

static Distance(value1, value2) → number

Parameters

Name Type Description
value1 Vector4
value2 Vector4

static DistanceSquared(value1, value2) → number

Parameters

Name Type Description
value1 Vector4
value2 Vector4

static Center(value1, value2) → Vector4

Parameters

Name Type Description
value1 Vector4
value2 Vector4