Format a number into SI metric prefixed value.
There are three different functions that converts a value into SI metric prefixed value.
Converts a number into the metric prefixed value.
Example:
formatSI(10000, "W"); // Returns { value: 10, unit: "kW" }
Uses formatSI() to convert the number, but it adds .toFixed(fractionDigits) to the value.
Example:
formatFixedSI(10000 "W", 3,); // Returns { value: "10.000", unit: "kW" }
Uses formatSI() to convert the number, but it adds .toPrecision(precision) to the value.
Example:
formatPrecisionSI(10000 "W", 3,); // Returns { value: "10.0", unit: "kW" }