Skip to main content

normalize

Function normalize 

Source
pub fn normalize(v: Vec2) -> Vec2
Expand description

Convert a vector into a unit vector if possible, otherwise returns the zero vector.