Here you can find the source of div(double a, double b)
Parameter | Description |
---|---|
a | the dividend. |
b | the divisor. |
public static long div(double a, double b)
//package com.java2s; //License from project: Open Source License public class Main { /**// w w w .j av a 2s . c o m * An integer division function suitable for our purpose. * * @param a the dividend. * @param b the divisor. * @return the quotient of integer division. */ public static long div(double a, double b) { return (long) Math.floor(a / b); } }