init(width:locale:usage:numberFormatStyle:)
Creates an instance using the provided width, locale, usage type, and number format.
Declaration
init(width: Measurement<UnitType>.FormatStyle.UnitWidth, locale: Locale = .autoupdatingCurrent, usage: MeasurementFormatUnitUsage<UnitType> = .general, numberFormatStyle: FloatingPointFormatStyle<Double>? = nil)Parameters
- width:
The width of the measurement unit.
- locale:
The locale to use when formatting the measurement.
- usage:
The intended purpose of the formatted measurement.
- numberFormatStyle:
The presentation style of the numeric value.