Class VectorBeta

Contains a description of a vector.

Hierarchy

  • Vector

Constructors

  • Parameters

    • x: number

      X component of the vector.

    • y: number

      Y component of the vector.

    • z: number

      Z component of the vector.

    Returns Vector

    Remarks

    Creates a new instance of an abstract vector.

Properties

x: number

Remarks

X component of this vector.

y: number

Remarks

Y component of this vector.

z: number

Remarks

Z component of this vector.

back: Vector

Remarks

A constant vector that represents (0, 0, -1).

down: Vector

Remarks

A constant vector that represents (0, -1, 0).

forward: Vector

Remarks

A constant vector that represents (0, 0, 1).

left: Vector

Remarks

A constant vector that represents (-1, 0, 0).

one: Vector

Remarks

A constant vector that represents (1, 1, 1).

right: Vector

Remarks

A constant vector that represents (1, 0, 0).

up: Vector

Remarks

A constant vector that represents (0, 1, 0).

zero: Vector

Remarks

A constant vector that represents (0, 0, 0).

Methods

  • Parameters

    • other: Vector

      Other vector to compare this vector to.

    Returns boolean

    True if the two vectors are equal.

    Remarks

    Compares this vector and another vector to one another.

  • Returns number

    Remarks

    Returns the length of this vector.

  • Returns number

    Remarks

    Returns the squared length of this vector.

  • Returns Vector

    Remarks

    Returns this vector as a normalized vector.

  • Parameters

    Returns Vector

    Remarks

    Returns the addition of these vectors.

  • Parameters

    Returns Vector

    Remarks

    Returns the cross product of these two vectors.

  • Parameters

    Returns number

    Remarks

    Returns the distance between two vectors.

  • Parameters

    Returns Vector

    Remarks

    Returns the component-wise division of these vectors.

  • Parameters

    Returns Vector

    Remarks

    Returns the linear interpolation between a and b using t as the control.

  • Parameters

    Returns Vector

    Remarks

    Returns a vector that is made from the largest components of two vectors.

  • Parameters

    Returns Vector

    Remarks

    Returns a vector that is made from the smallest components of two vectors.

  • Parameters

    Returns Vector

    Remarks

    Returns the component-wise product of these vectors.

  • Parameters

    Returns Vector

    Remarks

    Returns the spherical linear interpolation between a and b using s as the control.

  • Parameters

    Returns Vector

    Remarks

    Returns the subtraction of these vectors.