Here you can find the source of roundDown(long n, long m)
Parameter | Description |
---|---|
n | the number to round |
m | the number to round to. |
static int roundDown(long n, long m)
//package com.java2s; // to use, copy, modify, merge, publish, distribute, sublicense, and/or sell public class Main { /**// w w w .j a v a 2 s . c om * Round n down to nearest multiple of m. * * @param n the number to round * @param m the number to round to. * @return the result of the calculation */ static int roundDown(long n, long m) { return (int) ((n / m) * m); } }