Skip to main content

format_number

Function format_number 

Source
pub fn format_number(n: f64) -> String
Expand description

Formats a number like Luau’s tostring: whole numbers print without a fraction (3), others use the shortest form that round-trips (0.1), and really big or small ones get an exponent (1e+20).