accumulateValue method

int accumulateValue(
  1. int value
)

Implementation

int accumulateValue(int value) {
  int mask = (1 << bits) - 1;

  accumulatedValue += (value - lastValue) & mask;
  lastValue = value;

  return accumulatedValue;
}