Formats an integer as a fixed-point decimal string.
Treats n as if multiplied by 10 ** fractions. Useful for currency formatting.
n
10 ** fractions
The integer value.
Number of decimal places.
The formatted string.
formatFixedFloat(1234, 2); // "12.34"formatFixedFloat(100, 2); // "1.00" Copy
formatFixedFloat(1234, 2); // "12.34"formatFixedFloat(100, 2); // "1.00"
Formats an integer as a fixed-point decimal string.
Treats
nas if multiplied by10 ** fractions. Useful for currency formatting.