converting(to:)
Returns a measurement created by converting the receiver to the specified unit.
Declaration
func converting(to unit: Unit) -> Measurement<Unit>Parameters
- unit:
The unit to convert the measurement into.
Return Value
A new measurement with a value calculated by converting into the new unit.
Discussion
This method raises an invalidArgumentException if the receiver cannot be converted to unit.