convertTo method
- required LinearUnit toUnit,
- required double value,
Converts a value in this UOM into another UOM.
Parameters:
toUnit
— The UOM to convert to.value
— The value to convert.
Return Value: The value in the target UOM or NAN if the conversion fails.
Implementation
double convertTo({
required LinearUnit toUnit,
required double value,
}) {
return _withThrowingErrorHandler((errorHandler) {
return runtimecore.RT_LinearUnit_convertTo(
_handle,
toUnit._handle,
value,
errorHandler,
);
});
}