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