Here you can find the source of numToPowerOf(int num, int toPowerOf)
public static final int numToPowerOf(int num, int toPowerOf)
//package com.java2s; //License from project: Open Source License public class Main { public static final int numToPowerOf(int num, int toPowerOf) { return toPowerOf > 0 ? num << toPowerOf : (toPowerOf < 0 ? num >> toPowerOf : (toPowerOf == 0 ? 1 : num)); }/*ww w . ja v a 2 s . c o m*/ }