moved powerOfTwo methods from ImageUtility to Math