Skip to main content

format

Function format 

Source
pub fn format(fmt: &str, x: f64) -> String
Expand description

Format x with the given printf format string.

Unsupported formats fall back to %.17g. Non-finite values follow C printf, which prints inf, -inf, and nan. Serpent intercepts these before formatting unless nohuge is set, in which case this path applies.