Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
When formatting a value like 7.897 with a precision of 2 digits the code was: * muliplying the value by 100 (10^precision) => 789.7; * rouding the value => 790; * dividing the value by 100 => 7.9 This is inconsistent with other float values displayed with 2 decimal digits. Prefer the toFixed method which returns a string, "7.90" in the above exapmle. Since we also have integer values, and because JS is a joke that only knows about floats, attempt to guess if the value is an integer and do not display decimals in this case to keep the previous behavor in this case.
- Loading branch information