Java BigDecimal Divide divide(BigDecimal dividend, BigDecimal divisor)

Here you can find the source of divide(BigDecimal dividend, BigDecimal divisor)

Description

divide

License

Open Source License

Declaration

public static BigDecimal divide(BigDecimal dividend, BigDecimal divisor) 

Method Source Code


//package com.java2s;
import static java.util.Objects.requireNonNull;
import java.math.BigDecimal;
import java.math.RoundingMode;

public class Main {

    public static BigDecimal divide(BigDecimal dividend, BigDecimal divisor) {

        requireNonNull(dividend);/*from  w  w w. jav  a 2s  . c o  m*/
        requireNonNull(divisor);

        return dividend.divide(divisor, 4, RoundingMode.HALF_DOWN);
    }
}

Related

  1. div(BigDecimal val, long divisor)
  2. divide(BigDecimal a, BigDecimal b)
  3. divide(BigDecimal amount, BigDecimal divisor)
  4. divide(BigDecimal aValue1, BigDecimal aValue2, int scale)
  5. divide(BigDecimal bd1, BigDecimal bd2)
  6. divide(BigDecimal dividend, BigDecimal divisor)
  7. divide(BigDecimal dividend, BigDecimal divisor, int scale)
  8. divide(BigDecimal left, BigDecimal right)
  9. divide(BigDecimal num1, BigDecimal num2, int scale, int mode)