In short: Why can I use
let array: [[f64; width]; length] = core::array::from_fn(|_| rng.gen());
but not
let array: [[f64; width]; length] = core::array::from_fn(|_| rng.gen_range(0.0..1.0));
It's not terribly that it doesn't work, but I don't understand the reason here.
Aucun commentaire:
Enregistrer un commentaire