setBit method

int setBit(
  1. int n
)

Returns a new int with the nth bit set.

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

Implementation

int setBit(int n) {
  _mustBeAtLeast0(n);
  return _setBit(n);
}