Formats a number to a fixed number of decimal places.
The number or string to format
The maximum number of decimal places (default: 2)
The fixed-precision string representation
fix(12.3456, 2); // '12.35' Copy
fix(12.3456, 2); // '12.35'
Formats a number to a fixed number of decimal places.