getBit method

int getBit (
  1. int position
)

returns the bit on position, starting by 0 (big endian).

Implementation

int getBit(int position) {
  return (_source & (1 << position)) >> position;
}