Here you can find the source of roundDown(int n, int m)
public static int roundDown(int n, int m)
//package com.java2s; //License from project: Open Source License public class Main { public static int roundDown(int n, int m) { while (n % m != 0) n--;//from ww w .ja va2 s . co m return n; } }