pub fn isPowerOfTwo(int: anytype) bool
Asserts int > 0.
int > 0
int
1117 1118 1119 1120
pub fn isPowerOfTwo(int: anytype) bool { assert(int > 0); return (int & (int - 1)) == 0; }
Asserts
int > 0.