Adds the values of the argument vector to the orignal vector. This functions the same as vector1 + vector2 without creating a new vector object, skipping object construction and garbage collection.
Adds the components of the vectors together.
a = Vector(1, 1, 1) a:Add(Vector(1, 2, 3)) print(a)
If you don't want to set your vector to the result, and just return a new vector as the result. You can use a '+' operator to add two vectors together. The original vector will remain unchanged.
a = Vector(1, 1, 1) print(a + Vector(1, 2, 3))