Skip to main content

compact_decimal

Function compact_decimal 

Source
pub fn compact_decimal(value: f64, precision: usize) -> String
Expand description

Fixed precision without trailing fractional zeros. Preserves signed zero; callers that use the result as an identifier may choose to normalize it.