operator / method

DistanceUnit operator /(
  1. double value
)

Implementation

DistanceUnit operator /(double value) {
  return when(
    cm: (value) => Centimeter(value / value),
    inch: (value, _) => Inch(value / value),
  );
}