testBit

abstract fun testBit(n: Int): Boolean

Returns true if and only if the designated bit is set. (Computes ((this & (1<<n)) != 0).)

Return

true if and only if the designated bit is set.

Parameters

n

index of bit to test.

Throws

n is negative.