Function negateTuple

  • Negates the values of the components of a tuple, except for component w. This can be used where you do not want the negation to affect the original tuple but rather to produce a new, negated tuple

    Example

    const vector = tuple(1, -2, 3, 0) as Vector
    negateTuple(vector).components() // [-1, 2, -3, 0]

    Returns

    A tuple that is the result of negating the components (besides w) of a given tuple

    Parameters

    • tuple1: Ttuple

      Tuple to negate

    Returns Ttuple

Generated using TypeDoc