Vec2:normalize

Adjusts the values in the vector so that its direction stays the same but its length becomes 1.

v = Vec2:normalize()

Arguments

None

Returns

NameTypeDescription
vVec2The original vector.

See also