Java Number Divide divideByRoundDown(Number number1, Number number2)

Here you can find the source of divideByRoundDown(Number number1, Number number2)

Description

divide By Round Down

License

Apache License

Declaration

public static long divideByRoundDown(Number number1, Number number2) 

Method Source Code

//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;
    }
}

Related

  1. divide(Number numerator, Number denominator)
  2. divide(Number numerator, Number divisor)
  3. divideAndCeilWithBase(int number, int base)
  4. divideAndRoundDown(long number, long divisor)
  5. divideBy(Number number1, Number number2)
  6. division(Number numerator, Number denominator)
  7. divmod(byte[] number, int firstDigit, int base, int divisor)
  8. divmod256(byte[] number58, int startAt)
  9. divRate(double v1, double v2)