bitRange method

int bitRange(
  1. int left,
  2. int right
)

Returns an int containining bits inclusive of the last bit.

The result is left-padded with 0's.

Implementation

int bitRange(int left, int right) => bitChunk(left, left - right + 1);