fxbit_is_set(fx, i)
Return true
if the ith
bit of the
fixnum fx
is set, otherwise return false
.
The index i
must be nonnegative. It is taken as a zero-based index for the bits in the two's complement
representation of fx
, with the sign bit virtually replicated an infinite number of positions to the left.
fxbit_is_set(5, 0)
// true
fxbit_is_set(5, 1)
// false
fxbit_is_set(5, 2)
// true
fxbit_is_set(-5, 8)
// true
fxbit_is_set(5, 8)
// false