New Paste :: Recent Pastes:: Add Line Numbers
next power of 2 by godecho
int nextPowerOf2(const int &a) { static int rval = 1; while(rval < a) { rval<<=1; // same as rval*=2 } return rval; }