Members

Number

length

Returns the number of the elements.

Constructor

new

Vector

(Float32Array or Array<any> elements, [string subtype])
Parameters:
Name Type Description
elements Float32Array or Array<any>
subtype optional string

Methods

Symbol.iterator

()
Returns:
Type Description
IterableIterator<any>

an iterator over the elements of the vector

at

(number index)
Parameters:
Name Type Description
index number

getSubtype

()
Returns:
Type Description
string or undefined

get the subtype string, e.g., “float”, but it’s optional so it can return undefined

toString

()

Returns the string representation of the vector.

Returns:
Type Description
string