Skip to content

Allow configurable precision in format when in "engineering" mode #1147

@ewanorr

Description

@ewanorr

The "engineering" mode in the format function seems to ignore significant figures that occur after a decimal point. Considering the following two examples, the first performs as expected; however I expected that the second example would be more precise.

format(12400,{notation: "engineering"})
"12.400e+3" // expected "12.400e+3"

format(12400.00,{notation: "engineering"})
"12.400e+3" // expected "12.40000e+3"

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions