Here you can find the source of roundDownToNearestK(float v, int k)
public static int roundDownToNearestK(float v, int k)
//package com.java2s; //License from project: Open Source License public class Main { public static int roundDownToNearestK(float v, int k) { return (int) (Math.floor(v / k) * k); }//w ww. jav a 2 s . c o m }