Scenic.Math.Vector2.normalize

You're seeing just the function normalize, go back to Scenic.Math.Vector2 module for more information.

Specs

normalize(vector2 :: Scenic.Math.vector_2()) :: Scenic.Math.vector_2()

Normalize a vector so it has the same angle, but a length of 1.

Parameters:

  • vector2 - the vector

Returns: A vector with the same angle as the original, but a length of 1