src/main/java/com/rockagen/commons/util/Arith.java
public static double div(final double v1,final double v2,int scale,int roundingMode){

        if(scale<0){
            scale=DIV_SCALE;
        }
        if(roundingMode<0){
        	roundingMode=ROUNDING_MODE;
        }
        BigDecimal b1 = new BigDecimal(Double.toString(v1));
        BigDecimal b2 = new BigDecimal(Double.toString(v2));
        return b1.divide(b2,scale,roundingMode).doubleValue();
    }
public static double div(final double v1,final double v2,int scale,int roundingMode){

        if(scale<0){
            scale=DIV_SCALE;
        }
        if(roundingMode<0){
        	roundingMode=ROUNDING_MODE;
        }
        BigDecimal b1 = new BigDecimal(Double.toString(v1));
        BigDecimal b2 = new BigDecimal(Double.toString(v2));
        return b1.divide(b2,scale,roundingMode).doubleValue();
    }
public static double div ( final double v1 , final double v2 , int scale , int roundingMode ) { if ( scale < 0 ) { scale = DIV_SCALE ; } if ( roundingMode < 0 ) { roundingMode = ROUNDING_MODE ; } BigDecimal b1 = new BigDecimal ( Double . toString ( v1 ) ) ; BigDecimal b2 = new BigDecimal ( Double . toString ( v2 ) ) ; return b1 . divide ( b2 , scale , roundingMode ) . doubleValue ( ) ; }
div
@param v1 left value
@param v2 right value
@param scale precision default {@link #DIV_SCALE}
@param roundingMode default {@link #ROUNDING_MODE}
@return v1/v2
div