convertFrom method

double convertFrom(
  1. {required AreaUnit fromUnit,
  2. required double area}
)

Converts a value in another UOM into this UOM.

Parameters:

  • fromUnit — The UOM to convert from.
  • area — The value to convert.

Return Value: The value in the this UOM or NAN if the conversion fails.

Implementation

double convertFrom({required AreaUnit fromUnit, required double area}) {
  return _withThrowingErrorHandler((errorHandler) {
    return runtimecore.RT_AreaUnit_convertFrom(
        _handle, fromUnit._handle, area, errorHandler);
  });
}