hasBit function

bool hasBit(
  1. int bitfield,
  2. int bit
)

Implementation

bool hasBit(int bitfield, int bit) {
  return (bitfield & bit) != 0;
}