List of utility methods to do Double Number Divide
Double | calculateRoundDoubleQuotientOfTowIntegerNumber(Integer dividend, Integer divisor) calculate Round Double Quotient Of Tow Integer Number return round(calculateDoubleQuotientOfTowIntegerNumber(dividend, divisor));
|
int | ceil_divide(float left, float right) Divides the given left float value by the given right float value and returns the smallest integer value of division result that is not less than the result. float resF = divide(left, right); if (((int) resF) != resF) { return 1 + (int) resF; } else { return (int) resF; |
double | div(double a, double b) Make divided of two double values. return a / b;
|
double | div(double a, double b) div if (b == 0.0) { return 0.0; } else { return a / b; |
double | div(double a, double b) div return a / b;
|
long | div(double a, double b) An integer division function suitable for our purpose. return (long) Math.floor(a / b); |
double | div(Double dividend, Double quotient) build the division of given Doubles regardless of null {Category} NumberUtil {talendTypes} double | Double {param} double(2.5) dividend: dividend {param} double(4.3) quotient: quotient {example} div(2,4) result: 0.5 if (dividend == null || quotient == null) { return 0; } else { if (quotient.doubleValue() == 0) { return 0; } else { return dividend.doubleValue() / quotient.doubleValue(); |
double | div(double divisor, int dividend, int preciseFigures) div if (divisor > 0 && dividend > 0) { BigDecimal ds = new BigDecimal(divisor); BigDecimal dd = new BigDecimal(dividend); double result = ds.divide(dd, preciseFigures, BigDecimal.ROUND_HALF_UP).doubleValue(); return result; } else { return 0; |
long | div(double left, double right) div validateInput(left, right);
return computeDiv(left, right);
|
double | div(final double a, final double b) Div. return a / b;
|