Vec2:sub

Subtracts a vector or a number from the vector.


v = Vec2:sub(u)

Arguments

NameTypeDescription
uVec2 The other vector.

Returns

NameTypeDescription
vVec2 The original vector.

v = Vec2:sub(x, y)

Arguments

NameTypeDefaultDescription
xnumber A value to subtract from x component.
ynumberx A value to subtract from y component.

Returns

NameTypeDescription
vVec2 The original vector.

See also