Here you can find the source of roundUpToPowerOfTwo(int p_151236_0_)
public static int roundUpToPowerOfTwo(int p_151236_0_)
//package com.java2s; //License from project: Open Source License public class Main { /**/*from w w w . ja v a 2 s. c om*/ * Returns the input value rounded up to the next highest power of two. */ public static int roundUpToPowerOfTwo(int p_151236_0_) { int j = p_151236_0_ - 1; j |= j >> 1; j |= j >> 2; j |= j >> 4; j |= j >> 8; j |= j >> 16; return j + 1; } }