Interface Vector

Represents a vector with functions to manipulate it.

Hierarchy

Implemented by

Properties

0: number

The x component of the vector.

1: number

The y component of the vector.

objectType: "vector"

This object is of type vector.

virtual: true

Whether this object is virtual.

x: number

The x component of the vector.

y: number

The y component of the vector.

Methods

  • Provides iteration over the vector.

    Returns IterableIterator<number>

  • Normalizes the vector to a length, defaulting to 1, to create a new vector.

    Parameters

    • Optional length: number

      The length to normalize to.

    Returns Interfaces.Vector

    A new vector with the same direction as this vector and the given length.

Generated using TypeDoc