How can I convert a f64 into the closest f32?
There is neither a From nor a TryFrom implementation, presumably because such implementations are only provided for lossless conversions. I also searched for references to f32 in the f64 docs and vice versa, and found nothing.
let double: f64 = 0.;
// doesn't work
// let single: f32 = double.into();
// let single: f32 = double.try_into().unwrap();