Where a, b, c are f64 floats, and t is an array of some floats from 0 to 2pi. I've been trying to wrap my head around how I would succinctly apply an equation like this in Rust to calculate some array x. Obviously, steps like c * t won't work in Rust, so we can apply for_each commands like,
t.iter_mut().for_each(|val| *val *= c);
but then applying this kind of logic to all the operations of a, b, c and trigonometric functions, I think would trap me into writing some ugly spaghetti code. What's the correct way of going about this?