Function normalize

  • Normalizes the components of a vector such that its magnitude is now 1.

    Example

    const vector = new Vector(4, 0, 0)
    normalize(vector1).components() //-> [1, 0, 0, 0]

    Returns

    A new normalized Vector

    Parameters

    • tuple: Ttuple

      Tuple to normalize

    Returns Ttuple

Generated using TypeDoc