pub fn magnitude(x: &[f64]) -> f64
Magnitude of a vector.
let x = [1.0, 2.0, 3.0]; let m = magnitude(&x);