pub trait NumberFormatter {
// Required method
fn f(&self, n: &Ratio) -> String;
}Expand description
Ratio: https://docs.rs/hmath/latest/hmath/struct.Ratio.html
If you’re too lazy to read the docs, just call f64::try_from(n).unwrap().
It’s default to DefaultFormatter.