Skip to main content

vec_normalize_f64

Function vec_normalize_f64 

Source
pub fn vec_normalize_f64(v: &[f64]) -> Vec<f64>
Expand description

Normalise a f64 vector so that its values sum to 1.0.

Returns the vector unchanged if the sum is zero.