Vec2:set

Sets the components of the vector, either from numbers or an existing vector.


v = Vec2:set(x, y)

Arguments

NameTypeDefaultDescription
xnumber0 The new x value of the vector.
ynumberx The new y value of the vector.

Returns

NameTypeDescription
vVec2 The input vector.

v = Vec2:set(u)

Arguments

NameTypeDescription
uVec2 The vector to copy the values from.

Returns

NameTypeDescription
vVec2 The input vector.

See also