Skip to content

inconsistent output when value rounds to zero #3

@snaar

Description

@snaar

These currently pass:

assert_eq!(format!("{:.3}", PrettyPrintFloat(0f64)), "0.0");
assert_eq!(format!("{:.3}", PrettyPrintFloat(0.01f64)), "  0");

But maybe they both should be 0.0? Or at the very least the second one should not be padded to be three characters wide.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions