# MeasurementDecorator

``public struct MeasurementDecorator<UnitType> where UnitType : Unit``

Extending standard structures like `Measurement` with properties like `var meters` is convenient:

• it avoids extracting value without explicit conversion to a certain unit
• it simplifies getting value from an optional `Measurement`

But it is also risky because these extensions might conflict with extensions from other libraries or Apple. This decorator mitigates the risk of conflicts while providing a short, readable code.

Typical use cases are:

• extracting value from a value representing a unit of measure: ``` let optionalDistanceInMeters = distance?.tt.meters ```
• performing computations on values representing units of measure: ``` cumulativeDistance += anotherDistance.tt ```
• comparing values representing units of measure: ``` if delay < .tt.seconds(5) {} ```
• combining value extraction and typecast: ``` let intValue = distance.tt.intValue(in: .meters) ```
• ``` init(measurement:) ```

Create a `MeasurementDecorator` given a specified measurement.

#### Declaration

Swift

``public init(measurement: Measurement<UnitType>)``
• ``` measurement ```

Measurement with some `UnitType`.

#### Declaration

Swift

``public let measurement: Measurement<UnitType>``
• ``` intValue(in:rounded:) ```

A convenience method to perform both conversion to `Int` and conversion to the specified unit. `let intValue = distance?.tt.intValue(in: .meters)`

#### Declaration

Swift

``public func intValue(in unit: UnitType, rounded: FloatingPointRoundingRule = .towardZero) -> Int``

#### Parameters

 ``` unit ``` unit to which a value is converted. ``` rounded ``` a rule for rounding a floating-point number. By default, it is equal to the `FloatingPointRoundingRule.towardZero` value.

#### Return Value

measurement value converted to given unit and then to `Int`.

• ``` floatValue(in:) ```

Convenient method to always convert before getting value and allow optional chaining. `let optionalFloatValueInMeters = distance?.tt.floatValue(in: .meters)`

#### Declaration

Swift

``public func floatValue(in unit: UnitType) -> Float``

#### Parameters

 ``` unit ``` unit type to which a value is converted.

#### Return Value

measurement value converted to given unit and then to `Float`.

• ``` doubleValue(in:) ```

Convenient method to always convert before getting value and allow optional chaining. `let optionalDoubleValueInMeters = distance?.tt.doubleValue(in: .meters)`

#### Declaration

Swift

``public func doubleValue(in unit: UnitType) -> Double``

#### Parameters

 ``` unit ``` unit type to which a value is converted.

#### Return Value

measurement value converted to given unit and then to `Double`.

• ``` kilowattHoursPer100Kilometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilowattHoursPer100Kilometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilowattHoursPerKilometer(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilowattHoursPerKilometer(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilometersPerKilowattHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilometersPerKilowattHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milesPerKilowattHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milesPerKilowattHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilowattHoursPer100Kilometers ```

Converts a value to kilowatt-hours per 100 kilometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilowattHoursPer100Kilometers: Double { get }``
• ``` kilowattHoursPerKilometer ```

Converts a value to kilowatt-hours per kilometer. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilowattHoursPerKilometer: Double { get }``
• ``` kilometersPerKilowattHour ```

Converts a value to kilometers per kilowatt-hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilometersPerKilowattHour: Double { get }``
• ``` milesPerKilowattHour ```

Converts a value to miles per kilowatt-hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milesPerKilowattHour: Double { get }``
• ``` megaJoulePerLiter(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megaJoulePerLiter(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kiloJoulePerLiter(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kiloJoulePerLiter(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` joulePerLiter(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func joulePerLiter(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kiloCaloriesPerLiter(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kiloCaloriesPerLiter(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` caloriesPerLiter(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func caloriesPerLiter(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` megaJoulePerLiter ```

Converts a value to megajoule per liter. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megaJoulePerLiter: Double { get }``
• ``` kiloJoulePerLiter ```

Converts a value to kilojoule per liter. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kiloJoulePerLiter: Double { get }``
• ``` joulePerLiter ```

Converts a value to joule per liter. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var joulePerLiter: Double { get }``
• ``` kilocaloriesPerLiter ```

Converts a value to kilocalories per liter. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilocaloriesPerLiter: Double { get }``
• ``` caloriesPerLiter ```

Converts a value to calories per liter. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var caloriesPerLiter: Double { get }``
• ``` litersPerHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func litersPerHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` gallonsPerHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func gallonsPerHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialGallonsPerHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialGallonsPerHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` litersPerHour ```

Converts a value to liters per hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var litersPerHour: Double { get }``
• ``` gallonsPerHour ```

Converts a value to gallons per hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var gallonsPerHour: Double { get }``
• ``` imperialGallonsPerHour ```

Converts a value to imperial gallons per hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialGallonsPerHour: Double { get }``
• ``` unitRange(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func unitRange(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` percent(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func percent(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` percent value.

#### Return Value

`Measurement` with the given value.

• ``` unitRange ```

Converts a value to a unit range. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var unitRange: Double { get }``
• ``` percent ```

Converts a value to percentages. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var percent: Double { get }``
• ``` degrees(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func degrees(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` arcMinutes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func arcMinutes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` arcSeconds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func arcSeconds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` radians(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func radians(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` gradians(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func gradians(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` revolutions(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func revolutions(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` degrees ```

Converts a value to degrees. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var degrees: Double { get }``
• ``` arcMinutes ```

Converts a value to arc minutes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var arcMinutes: Double { get }``
• ``` arcSeconds ```

Converts a value to arc seconds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var arcSeconds: Double { get }``
• ``` radians ```

Converts a value to radians. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var radians: Double { get }``
• ``` gradians ```

Converts a value to gradians. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var gradians: Double { get }``
• ``` revolutions ```

Converts a value to revolutions. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var revolutions: Double { get }``
• ``` hours(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func hours(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` hours.

#### Return Value

`Measurement` with the given value.

• ``` minutes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func minutes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` munites.

#### Return Value

`Measurement` with the given value.

• ``` seconds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func seconds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` seconds.

#### Return Value

`Measurement` with the given value.

• ``` milliseconds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milliseconds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` milliseconds.

#### Return Value

`Measurement` with the given value.

• ``` microseconds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func microseconds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` microseconds.

#### Return Value

`Measurement` with the given value.

• ``` nanoseconds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func nanoseconds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` nanoseconds.

#### Return Value

`Measurement` with the given value.

• ``` picoseconds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func picoseconds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` picoseconds.

#### Return Value

`Measurement` with the given value.

• ``` date(_:) ```

A convenience method for measurement creation. Converts a value to `seconds` and uses `Date.init(timeIntervalSince1970:)` to a `Date` struct instance.

#### Declaration

Swift

``public static func date(_ value: Date) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` seconds since 1970 (as is `Date.init(timeIntervalSince1970:)`).

#### Return Value

`Measurement` with the given value.

• ``` hours ```

Converts a value to hours. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var hours: Double { get }``
• ``` minutes ```

Converts a value to minutes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var minutes: Double { get }``
• ``` seconds ```

Converts a value to seconds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var seconds: Double { get }``
• ``` milliseconds ```

Converts a value to milliseconds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milliseconds: Double { get }``
• ``` microseconds ```

Converts a value to microseconds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var microseconds: Double { get }``
• ``` nanoseconds ```

Converts a value to nanoseconds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var nanoseconds: Double { get }``
• ``` picoseconds ```

Converts a value to picoseconds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var picoseconds: Double { get }``
• ``` date ```

Converts a value to `seconds` and uses `Date.init(timeIntervalSince1970:)` to a `Date` struct instance.

#### Declaration

Swift

``public var date: Date { get }``
• ``` megaamperes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megaamperes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kiloamperes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kiloamperes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` amperes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func amperes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milliamperes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milliamperes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` microamperes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func microamperes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` megaamperes ```

A convenient way to always convert before extracting the value.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megaamperes: Double { get }``
• ``` kiloamperes ```

Converts a value to kiloamperes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kiloamperes: Double { get }``
• ``` amperes ```

Converts a value to amperes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var amperes: Double { get }``
• ``` milliamperes ```

Converts a value to milliamperes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milliamperes: Double { get }``
• ``` microamperes ```

Converts a value to microamperes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var microamperes: Double { get }``
• ``` megavolts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megavolts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilovolts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilovolts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` volts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func volts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` millivolts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func millivolts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` microvolts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func microvolts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` megavolts ```

Converts a value to megavolts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megavolts: Double { get }``
• ``` kilovolts ```

Converts a value to kilovolts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilovolts: Double { get }``
• ``` volts ```

Converts a value to volts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var volts: Double { get }``
• ``` millivolts ```

Converts a value to millivolts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var millivolts: Double { get }``
• ``` microvolts ```

Converts a value to microvolts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var microvolts: Double { get }``
• ``` kilojoules(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilojoules(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` joules(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func joules(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilocalories(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilocalories(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` calories(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func calories(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilowattHours(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilowattHours(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilojoules ```

Converts a value to kilojoules. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilojoules: Double { get }``
• ``` joules ```

Converts a value to joules. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var joules: Double { get }``
• ``` kilocalories ```

Converts a value to kilocalories. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilocalories: Double { get }``
• ``` calories ```

Converts a value to calories. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var calories: Double { get }``
• ``` kilowattHours ```

Converts a value to kilowatt-hours. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilowattHours: Double { get }``
• ``` litersPer100Kilometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func litersPer100Kilometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milesPerImperialGallon(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milesPerImperialGallon(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milesPerGallon(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milesPerGallon(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` litersPer100Kilometers ```

Converts a value to liters per 100 kilometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var litersPer100Kilometers: Double { get }``
• ``` milesPerImperialGallon ```

Converts a value to miles per imperial gallon. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milesPerImperialGallon: Double { get }``
• ``` milesPerGallon ```

Converts a value to miles per gallon. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milesPerGallon: Double { get }``
• ``` megameters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megameters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` hectometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func hectometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` decameters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func decameters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` meters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func meters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` decimeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func decimeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` centimeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func centimeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` millimeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func millimeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` micrometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func micrometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` nanometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func nanometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` picometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func picometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` inches(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func inches(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` feet(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func feet(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` yards(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func yards(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` miles(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func miles(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` scandinavianMiles(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func scandinavianMiles(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` lightyears(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func lightyears(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` nauticalMiles(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func nauticalMiles(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` fathoms(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func fathoms(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` furlongs(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func furlongs(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` astronomicalUnits(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func astronomicalUnits(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` parsecs(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func parsecs(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` megameters ```

Converts a value to megameters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megameters: Double { get }``
• ``` kilometers ```

Converts a value to kilometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilometers: Double { get }``
• ``` hectometers ```

Converts a value to hectometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var hectometers: Double { get }``
• ``` decameters ```

Converts a value to decameters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var decameters: Double { get }``
• ``` meters ```

Converts a value to meters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var meters: Double { get }``
• ``` decimeters ```

Converts a value to decimeters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var decimeters: Double { get }``
• ``` centimeters ```

Converts a value to centimeters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var centimeters: Double { get }``
• ``` millimeters ```

Converts a value to millimeters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var millimeters: Double { get }``
• ``` micrometers ```

Converts a value to micrometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var micrometers: Double { get }``
• ``` nanometers ```

Converts a value to nanometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var nanometers: Double { get }``
• ``` picometers ```

Converts a value to picometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var picometers: Double { get }``
• ``` inches ```

Converts a value to inches. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var inches: Double { get }``
• ``` feet ```

Converts a value to feet. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var feet: Double { get }``
• ``` yards ```

Converts a value to yards. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var yards: Double { get }``
• ``` miles ```

Converts a value to miles. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var miles: Double { get }``
• ``` scandinavianMiles ```

Converts a value to Scandinavian miles. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var scandinavianMiles: Double { get }``
• ``` lightyears ```

Converts a value to light years. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var lightyears: Double { get }``
• ``` nauticalMiles ```

Converts a value to nautical miles. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var nauticalMiles: Double { get }``
• ``` fathoms ```

Converts a value to fathoms. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var fathoms: Double { get }``
• ``` furlongs ```

Converts a value to furlongs. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var furlongs: Double { get }``
• ``` astronomicalUnits ```

Converts a value to astronomical units. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var astronomicalUnits: Double { get }``
• ``` parsecs ```

Converts a value to parsecs. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var parsecs: Double { get }``
• ``` kilograms(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilograms(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` grams(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func grams(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` decigrams(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func decigrams(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` centigrams(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func centigrams(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milligrams(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milligrams(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` micrograms(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func micrograms(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` nanograms(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func nanograms(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` picograms(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func picograms(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` ounces(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func ounces(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` pounds(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func pounds(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` stones(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func stones(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` metricTons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func metricTons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` shortTons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func shortTons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` carats(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func carats(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` ouncesTroy(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func ouncesTroy(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` slugs(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func slugs(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilograms ```

Converts a value to kilograms. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilograms: Double { get }``
• ``` grams ```

Converts a value to grams. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var grams: Double { get }``
• ``` decigrams ```

Converts a value to decigrams. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var decigrams: Double { get }``
• ``` centigrams ```

Converts a value to centigrams. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var centigrams: Double { get }``
• ``` milligrams ```

Converts a value to milligrams. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milligrams: Double { get }``
• ``` micrograms ```

Converts a value to micrograms. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var micrograms: Double { get }``
• ``` nanograms ```

Converts a value to nanograms. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var nanograms: Double { get }``
• ``` picograms ```

Converts a value to picograms. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var picograms: Double { get }``
• ``` ounces ```

Converts a value to ounces. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var ounces: Double { get }``
• ``` pounds ```

Converts a value to pounds. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var pounds: Double { get }``
• ``` stones ```

Converts a value to stones. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var stones: Double { get }``
• ``` metricTons ```

Converts a value to metric tons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var metricTons: Double { get }``
• ``` shortTons ```

Converts a value to short tons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var shortTons: Double { get }``
• ``` carats ```

Converts a value to carats. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var carats: Double { get }``
• ``` ouncesTroy ```

Converts a value to ounces troy. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var ouncesTroy: Double { get }``
• ``` slugs ```

Converts a value to slugs. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var slugs: Double { get }``
• ``` terawatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func terawatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` gigawatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func gigawatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` megawatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megawatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kilowatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilowatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` watts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func watts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milliwatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milliwatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` microwatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func microwatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` nanowatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func nanowatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` picowatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func picowatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` femtowatts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func femtowatts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` horsepower(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func horsepower(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` terawatts ```

Converts a value to terawatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var terawatts: Double { get }``
• ``` gigawatts ```

Converts a value to gigawatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var gigawatts: Double { get }``
• ``` megawatts ```

A convenient way to always convert before extracting the value.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megawatts: Double { get }``
• ``` kilowatts ```

Converts a value to kilowatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilowatts: Double { get }``
• ``` watts ```

Converts a value to watts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var watts: Double { get }``
• ``` milliwatts ```

Converts a value to milliwatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milliwatts: Double { get }``
• ``` microwatts ```

Converts a value to microwatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var microwatts: Double { get }``
• ``` nanowatts ```

Converts a value to nanowatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var nanowatts: Double { get }``
• ``` picowatts ```

Converts a value to picowatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var picowatts: Double { get }``
• ``` femtowatts ```

Converts a value to femtowatts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var femtowatts: Double { get }``
• ``` horsepower ```

Converts a value to horsepower. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var horsepower: Double { get }``
• ``` metersPerSecond(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func metersPerSecond(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` meters per second.

#### Return Value

`Measurement` with the given value.

• ``` metersPerHour(_:) ```

A convenience method for measurement creation.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public static func metersPerHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` meters per hour.

#### Return Value

`Measurement` with the given value.

• ``` kilometersPerHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilometersPerHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` kilometers per hour.

#### Return Value

`Measurement` with the given value.

• ``` milesPerHour(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milesPerHour(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` miles per hour.

#### Return Value

`Measurement` with the given value.

• ``` knots(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func knots(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` knots.

#### Return Value

`Measurement` with the given value.

• ``` metersPerSecond ```

Converts a value to meters per second. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var metersPerSecond: Double { get }``
• ``` metersPerHour ```

Converts a value to meters per hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var metersPerHour: Double { get }``
• ``` kilometersPerHour ```

Converts a value to kilimeters per hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kilometersPerHour: Double { get }``
• ``` milesPerHour ```

Converts a value to miles per hour. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milesPerHour: Double { get }``
• ``` knots ```

Converts a value to knots. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var knots: Double { get }``
• ``` bytes(_:) ```

A convenience method for measurement creation.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public static func bytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` bytes.

#### Return Value

`Measurement` with the given value.

• ``` kilobytes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kilobytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` kilobytes.

#### Return Value

`Measurement` with the given value.

• ``` megabytes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` megabytes.

#### Return Value

`Measurement` with the given value.

• ``` gigabytes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func gigabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` gigabytes.

#### Return Value

`Measurement` with the given value.

• ``` terabytes(_:) ```

/ A convenience method for measurement creation.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public static func terabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` terabytes.

#### Return Value

`Measurement` with the given value.

• ``` petabytes(_:) ```

A convenience method for measurement creation.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public static func petabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` petabytes.

#### Return Value

`Measurement` with the given value.

• ``` exabytes(_:) ```

A convenience method for measurement creation.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public static func exabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` exabytes.

#### Return Value

`Measurement` with the given value.

• ``` zettabytes(_:) ```

A convenience method for measurement creation.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public static func zettabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` zettabytes.

#### Return Value

`Measurement` with the given value.

• ``` yottabytes(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func yottabytes(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` yottabytes.

#### Return Value

`Measurement` with the given value.

• ``` bytes ```

Converts a value to bytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var bytes: Double { get }``
• ``` kilobytes ```

Converts a value to kilobytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed. To simplify the code, keep the data in `Measurement` and convert using this method whenever need a value.

#### Declaration

Swift

``public var kilobytes: Double { get }``
• ``` megabytes ```

Converts a value to megabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megabytes: Double { get }``
• ``` gigabytes ```

Converts a value to gigabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var gigabytes: Double { get }``
• ``` terabytes ```

Converts a value to terabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var terabytes: Double { get }``
• ``` petabytes ```

Converts a value to petabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var petabytes: Double { get }``
• ``` exabytes ```

Converts a value to exabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var exabytes: Double { get }``
• ``` zettabytes ```

Converts a value to zettabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var zettabytes: Double { get }``
• ``` yottabytes ```

Converts a value to yottabytes. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

Important

This is a Public Preview API. It may be changed or removed at any time.

#### Declaration

Swift

``public var yottabytes: Double { get }``
• ``` megaliters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func megaliters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` kiloliters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func kiloliters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` liters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func liters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` deciliters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func deciliters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` centiliters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func centiliters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` milliliters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func milliliters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicKilometers(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicKilometers(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicMeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicMeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicDecimeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicDecimeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicCentimeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicCentimeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicMillimeters(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicMillimeters(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicInches(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicInches(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicFeet(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicFeet(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicYards(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicYards(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cubicMiles(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cubicMiles(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` acreFeet(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func acreFeet(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` bushels(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func bushels(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` teaspoons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func teaspoons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` tablespoons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func tablespoons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` fluidOunces(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func fluidOunces(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` cups(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func cups(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` pints(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func pints(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` quarts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func quarts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` gallons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func gallons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialTeaspoons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialTeaspoons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialTablespoons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialTablespoons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialFluidOunces(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialFluidOunces(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialPints(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialPints(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialQuarts(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialQuarts(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` imperialGallons(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func imperialGallons(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` metricCups(_:) ```

A convenience method for measurement creation.

#### Declaration

Swift

``public static func metricCups(_ value: Double) -> Measurement<UnitType>``

#### Parameters

 ``` value ``` unit range value.

#### Return Value

`Measurement` with the given value.

• ``` megaliters ```

Converts a value to megaliters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var megaliters: Double { get }``
• ``` kiloliters ```

Converts a value to kiloliters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var kiloliters: Double { get }``
• ``` liters ```

Converts a value to liters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var liters: Double { get }``
• ``` deciliters ```

Converts a value to deciliters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var deciliters: Double { get }``
• ``` centiliters ```

Converts a value to centiliters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var centiliters: Double { get }``
• ``` milliliters ```

Converts a value to milliliters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var milliliters: Double { get }``
• ``` cubicKilometers ```

Converts a value to cubic kilometers. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicKilometers: Double { get }``
• ``` cubicMeters ```

Converts a value to cubic meters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicMeters: Double { get }``
• ``` cubicDecimeters ```

Converts a value to cubic decimeters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicDecimeters: Double { get }``
• ``` cubicCentimeters ```

Converts a value to cubic centimeters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicCentimeters: Double { get }``
• ``` cubicMillimeters ```

Converts a value to cubic millimeters. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicMillimeters: Double { get }``
• ``` cubicInches ```

Converts a value to cubic inches. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicInches: Double { get }``
• ``` cubicFeet ```

Converts a value to cubic feet. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicFeet: Double { get }``
• ``` cubicYards ```

Converts a value to cubic yards. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicYards: Double { get }``
• ``` cubicMiles ```

Converts a value to cubic miles. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cubicMiles: Double { get }``
• ``` acreFeet ```

Converts a value to acre feet. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var acreFeet: Double { get }``
• ``` bushels ```

Converts a value to bushels. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var bushels: Double { get }``
• ``` teaspoons ```

Converts a value to tea spoons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var teaspoons: Double { get }``
• ``` tablespoons ```

Converts a value to table spoons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var tablespoons: Double { get }``
• ``` fluidOunces ```

Converts a value to fluid ounces. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var fluidOunces: Double { get }``
• ``` cups ```

Converts a value to cups. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var cups: Double { get }``
• ``` pints ```

Converts a value to pints. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var pints: Double { get }``
• ``` quarts ```

Converts a value to quarts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var quarts: Double { get }``
• ``` gallons ```

Converts a value to gallons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var gallons: Double { get }``
• ``` imperialTeaspoons ```

Converts a value to imperial tea spoons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialTeaspoons: Double { get }``
• ``` imperialTablespoons ```

Converts a value to imperial table spoons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialTablespoons: Double { get }``
• ``` imperialFluidOunces ```

Converts a value to imperial fluid ounces. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialFluidOunces: Double { get }``
• ``` imperialPints ```

Converts a value to imperial pints. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialPints: Double { get }``
• ``` imperialQuarts ```

Converts a value to imperial quarts. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialQuarts: Double { get }``
• ``` imperialGallons ```

Converts a value to imperial gallons. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var imperialGallons: Double { get }``
• ``` metricCups ```

Converts a value to metric cups. The value can be safely extracted after conversion.

Note

Getting a value from `Measurement` without conversion to the expected unit is error-prone. Keep the data in `Measurement` and convert using this method whenever a value is needed.

#### Declaration

Swift

``public var metricCups: Double { get }``