setBit

Sets bit at position pos in integer b to state

T
setBit
(
T
)
(
T b
,
uint pos
,
bool state
)

Examples

assert(setBit(0, 0, true) == 1);
assert(setBit(1, 0, false) == 0);

Meta