Vector.sub(a, b);
No description
Arguments
a
The first vectorb
The second vectorReturns
Vector
The subtracted vectorlocal a = createVector(3, 5);
local b = createVector(2, 3);
-- Non-mutable
print(Vector.sub(a, b)); -- { 1.0, 2.0 }
print(a - b); -- { 1.0, 2.0 }
print(a); -- { 3.0, 5.0 }
-- Mutable
print(a:sub(b)); -- { 1.0, 2.0 }
print(a); -- { 1.0, 2.0 }