Skip to main content

Module number

Module number 

Source
Expand description

Human-friendly rendering of quantity numbers.

Used by the web UI and menu handlers, where 0.5 should read as 1/2 rather than as a float.

Functionsยง

format_number
Formats a floating-point number as a human-readable string with fractions Based on the approach from cooklang-rs/bindings/src/lib.rs
format_quantity
Formats a quantity value for display