convertFrom method

double convertFrom({
  1. required LinearUnit fromUnit,
  2. 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.