vector

Interact with Vectors easily

New vector

var vector = new vec(1, 2, 3);

Unpack

vector.unpack();

This returns the X, Y, Z in the vector. You can also do the following:

var [x, y, z] = vector.unpack();

Repack

vec.repack(vector: vec);

Add

vec.add(vector: vec);

Multiply

vec.multiply(vector: vec);

Dot

vec.dot(vector: vec);

Last updated

Was this helpful?