isSet method

bool isSet(
  1. int n
)

Returns whether bit n is set (i.e. 1).

The current int instance is treated as bits of an unknown length.

Implementation

bool isSet(int n) => getBit(n) == 1;