Returns a measurement created by converting the receiver to the specified unit.
- iOS 10.0+
- macOS 10.12+
- Mac Catalyst 13.0+
- tvOS 10.0+
- watchOS 3.0+
The unit to convert the measurement into.
A new measurement with a value calculated by converting into the new unit.
This method raises an
invalid if the receiver cannot be converted to unit.