isPowerOf2

Power of 2 test. T should be an uinteger type

bool
isPowerOf2
(
T
)
(
T arg
)
if (
!isPointer!T
)

Parameters

arg T

an integer value

Return Value

Type: bool

true iff arg is 2^n for some n > 0

Meta