Skip to main content

format_float

Function format_float 

Source
pub fn format_float(value: f64) -> SmolStr
Expand description

How candela writes a float: with a decimal point or an exponent, so a whole float reads as a float rather than as an int. An infinity and a not-a-number have no such form and print as themselves.

Every float goes through here on its way to text: string, print, and a float inside a printed array, map, struct or enum.