vector
v0.0.6createVector(x, y);Create a vector instance
Arguments
xThe first component of the vectoryThe second component of the vectorReturns
VectorThe created vector local a = createVector(3, 5);
local b = createVector(1, 3);
local c = a:add(b);
print(c);Vector.print();Since a Vector implements a print method, it can be used in the print function
local a = createVector(3, 5);
-- With print
print(a);
-- With class method
Vector.print(a);
-- with instance
a:print();Vector.mult(a, b);No description
Arguments
aThe first vectorbThe second vectorReturns
VectorThe added vector local a = createVector(3, 5);
local b = createVector(1, 3);
print(a:mult(b));
print(Vector.mult(a, b));Vector.add(a, b);No description
Arguments
aThe first vectorbThe second vectorReturns
VectorThe multiplied vector local a = createVector(1, 4);
local b = createVector(8, 2);
print(a:add(b));
print(Vector.add(a, b));