public static int FindPreviousPositivePowerOfTwo(int value) { unchecked { return(1 << (31 - IntUtil.NumberOfLeadingZeros(value))); } }
public static int FindNextPositivePowerOfTwo(int value) { unchecked { return(1 << (32 - IntUtil.NumberOfLeadingZeros(value - 1))); } }