Graphmath.Vec2.normalize
You're seeing just the function
normalize
, go back to Graphmath.Vec2 module for more information.
Link to this function
normalize(a)
Specs
normalize(a)
finds the unit vector with the same direction as a vec2
.
a
is the vec2
to be normalized.
It returns a vec2
of the form {normx, normy}
.
This is done by dividing each component by the vector's magnitude.