operator / method

Quantity operator /(
  1. Quantity that
)

Implementation

Quantity operator /(Quantity that) {
  final simplifiedUnit = (unit / that.unit).simplify();
  final newValue = (value / that.value) * simplifiedUnit.factor;

  return Quantity._(newValue, simplifiedUnit.unit);
}