Vec2:add

Adds a vector or a number to the vector.

v = Vec2:add(u)

Arguments

NameTypeDescription
uVec2The other vector.

Returns

NameTypeDescription
vVec2The original vector.

v = Vec2:add(x)

Arguments

NameTypeDescription
xnumberA number to add to each component.

Returns

NameTypeDescription
vVec2The original vector.

See also