Expand description
Miscellaneous tools to format and parse numbers, durations, etc.
TODO(emilk): move some of this numeric formatting into emath
so we can use it in egui_plot
.
Structs§
- Float
Format Options - Options for how to format a floating point number, e.g. an
f64
.
Traits§
Functions§
- approximate_
large_ number - Pretty format a large number by using SI notation (base 10), e.g.
- format_
bytes - Pretty format a number of bytes by using SI notation (base2), e.g.
- format_
f32 - Format a number with about 7 decimals of precision.
- format_
f64 - Format a number with about 15 decimals of precision.
- format_
int - Pretty format a signed number by using thousands separators for readability.
- format_
lat_ lon - Format a latitude or longitude value.
- format_
timestamp_ secs - Formats a timestamp in seconds to a string.
- format_
uint - Pretty format an unsigned integer by using thousands separators for readability.
- next_
grid_ tick_ magnitude_ nanos - When showing grid-lines representing time.
- parse_
bytes - parse_
bytes_ base2 - parse_
bytes_ base10 - parse_
duration - parse_
f64 - Parses a number, ignoring whitespace (e.g. thousand separators),
and treating the special minus character
MINUS
(−) as a minus sign. - parse_
i64 - Parses a number, ignoring whitespace (e.g. thousand separators),
and treating the special minus character
MINUS
(−) as a minus sign. - parse_
timestamp_ secs - Parses seconds from a string.