Instance Method

converted(to:)

Returns a new measurement created by converting to the specified unit.

Declaration

func converted(to otherUnit: UnitType) -> Measurement<UnitType>
Available when UnitType conforms to Dimension.

Parameters

otherUnit

A unit of the same Dimension.

Return Value

A converted measurement.

See Also

Converting to Other Units

func convert(to: UnitType)

Converts the measurement to the specified unit.

Beta Software

This documentation contains preliminary information about an API or technology in development. This information is subject to change, and software implemented according to this documentation should be tested with final operating system software.

Learn more about using Apple's beta software