formatQuantity MethodStatic
Format a quantity value into a single text string based on the current format specification of this class.
formatQuantity(magnitude: number, spec: FormatterSpec): string
| Parameter | Type | Description |
|---|---|---|
| magnitude | number | defines the value to spec.format. |
| spec | FormatterSpec | A FormatterSpec object the defines specification for the magnitude and unit conversions for the formatter. |
Returns - string
Defined in
- quantity/src/Formatter/Formatter.ts Line 365
Last Updated: 20 June, 2023