normalize

Function normalize 

Source
pub fn normalize<T, V>(v: &V) -> V
where T: FloatScalar, V: FloatVector<T>,
Expand description

Normalizes a vector to unit length.

§Mathematical Definition

v̂ = v / ||v||

§Note

Returns NaN or Inf components if the vector has zero length.