Produces the sum of two tuples, the 2 tuples can be of any kind but both cannot be a Point at the same time Point + Vector -> Point Vector + Vector -> Vector Point + Point -/- invalid
const point = tuple(3, -2, 5, 1)const vector = tuple(-2, 3, 1, 0)tupleSum(point, vector).components() //->[1,1,6,1]
A new tuple that
RangeError - Thrown if user attempts to add two Points
Tuple to sum
Generated using TypeDoc
Produces the sum of two tuples, the 2 tuples can be of any kind but both cannot be a Point at the same time Point + Vector -> Point Vector + Vector -> Vector Point + Point -/- invalid
Example
Returns
A new tuple that
Throws
RangeError - Thrown if user attempts to add two Points