divide method

int divide(
  1. int a,
  2. int b
)

Implementation

int divide(int a, int b) {
  if (b == 0) {
    throw const BarcodeException('Divide by zero');
  } else if (a == 0) {
    return 0;
  }
  return aLogTbl[(logTbl[a] - logTbl[b]) % (size - 1)];
}