Vector.add

v0.1.6
Vector.add(a, b);

No description

Arguments

aThe first vector
bThe second vector

Returns

VectorThe added vector

local a = createVector(4, 2);
local b = createVector(2, 1);

-- Non-mutable
print(Vector.add(a, b)); -- { 6.0, 3.0 }
print(a + b);            -- { 6.0, 3.0 }
print(a);                -- { 4.0, 2.0 }

-- Mutable
print(a:add(b));	-- { 6.0, 3.0 }
print(a) 		-- { 6.0, 3.0 }
See Vector.add in lu5_vector.h