public static int nextPowerOfTwo ( int value ) { return ( int ) Math . pow ( 2 , Math . ceil ( Math . log ( value ) / Math . log ( 2 ) ) ) ; }
Rounds the specified value up to the next nearest power of two .