Skip to main content

Vector

Vector is a base class for Vector2, Vector3 and Vector4, providing common methods to those classes.

Inheritance

class Vector extends [MathArray](./docs/api-reference/math-array) extends [Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)

Methods

Vector.clone()

Vector.copy(array)

Vector.set(...args)

Vector.fromArray(array, offset = 0)

Vector.toString()

Vector.toArray(array = [], offset = 0)

Vector.equals(array)

Vector.exactEquals(array)

Vector.validate(array = this)

Vector.check(array = this)

Vector.normalize()