Here you can find the source of roundUpTo(int a, int quanta)
public static int roundUpTo(int a, int quanta)
//package com.java2s; //License from project: Mozilla Public License public class Main { public static int roundUpTo(int a, int quanta) { // works with pot quanta return (a + (quanta - 1)) & -quanta; }/*w w w .j a va2s . c om*/ }