Vec2:add

Adds a vector or a number to the vector.


v = Vec2:add(u)

Arguments

NameTypeDescription
uVec2 The other vector.

Returns

NameTypeDescription
vVec2 The original vector.

v = Vec2:add(x, y)

Arguments

NameTypeDefaultDescription
xnumber A value to add to x component.
ynumberx A value to add to y component.

Returns

NameTypeDescription
vVec2 The original vector.

See also