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