pub fn scale_vec<T, U>(vec: Vec<T>, scalar: U) -> Vec<T>where T: Copy + Mul<U>, Vec<T>: FromIterator<<T as Mul<U>>::Output>, U: Copy,
Scales a vector by the given value.