pub fn mag2<T: Float, V: Magnitude<T>>(a: V) -> T
returns the scalar magnitude or length of vector a squared to avoid using sqrt
a