bitTest

fun A_Number.bitTest(bitPosition: Int): Boolean

Extract the bit with value 2^bitPosition from the integer, as a Boolean.

Receiver

The integer to query.

Return

True if the indicated bit was set, otherwise false.

Parameters

bitPosition

Which bit to query. 0 indicates the low bit (even/odd), and in general, the bit representing 2^bitPosition is being queried. This must be non-negative.