operator ~/ method

Distance operator ~/(
  1. int quotient
)

Divides this Distance by the given quotient and returns the result as a new Distance object.

Throws an IntegerDivisionByZeroException if quotient is 0.

Implementation

Distance operator ~/(int quotient) {
  if (quotient == 0) throw IntegerDivisionByZeroException();
  return Distance._micrometers(_distance ~/ quotient);
}