divide method

void divide(
  1. int other
)

Performs integer division by other.

Implementation

void divide(int other) {
  if (other == 0) throw ArgumentError('Cannot divide by zero');
  value = value ~/ other;
}