Here you can find the source of roundToMultiple(int value, int divisor)
public static int roundToMultiple(int value, int divisor)
//package com.java2s; //License from project: Apache License public class Main { public static int roundToMultiple(int value, int divisor) { int rem = value % divisor; if (rem == 0) return (value); return (value + divisor - rem); }/*from w ww. j av a 2 s. c o m*/ }