Here you can find the source of divideByRoundDown(Number number1, Number number2)
public static long divideByRoundDown(Number number1, Number number2)
//package com.java2s; //License from project: Apache License public class Main { public static long divideByRoundDown(Number number1, Number number2) { return (long) Math.floor(divideBy(number1, number2)); }/*from ww w .ja v a2 s .c o m*/ public static double divideBy(Number number1, Number number2) { double n1 = 0; double n2 = 0; if (number1 != null) { n1 = number1.doubleValue(); } if (number2 != null) { n2 = number2.doubleValue(); } return n1 / n2; } }