getConverterTo method

UnitConverter getConverterTo(
  1. Unit that
)

Returns a converter of numeric values from this unit to another unit.

Implementation

UnitConverter getConverterTo(Unit that) {
  if (this == that) return UnitConverter.identity;
  var thisSystemUnit = standardUnit;
  var thatSystemUnit = that.standardUnit;
  if (thisSystemUnit == thatSystemUnit) {
    return that.toStandardUnit().inverse.concatenate(toStandardUnit());
  }
  // Use dimensional transforms.
  throw UnimplementedError();
}