Java BigDecimal Divide divide(BigDecimal a, BigDecimal b)

Here you can find the source of divide(BigDecimal a, BigDecimal b)

Description

divide

License

Open Source License

Declaration

public static BigDecimal divide(BigDecimal a, BigDecimal b) 

Method Source Code


//package com.java2s;
import java.math.BigDecimal;
import java.math.RoundingMode;

public class Main {
    private static int scale = 5;

    public static BigDecimal divide(BigDecimal a, BigDecimal b) {
        return a.divide(b, scale, RoundingMode.HALF_UP);
    }//from   w  w w. j  a va2  s .co  m
}

Related

  1. decimalDivide(BigDecimal cs, BigDecimal bcs, int scale)
  2. div(BigDecimal b1, BigDecimal b2)
  3. div(BigDecimal d1, BigDecimal d2)
  4. div(BigDecimal v1, BigDecimal v2)
  5. div(BigDecimal val, long divisor)
  6. divide(BigDecimal amount, BigDecimal divisor)
  7. divide(BigDecimal aValue1, BigDecimal aValue2, int scale)
  8. divide(BigDecimal bd1, BigDecimal bd2)
  9. divide(BigDecimal dividend, BigDecimal divisor)