Java BigDecimal scale(BigDecimal b1, BigDecimal b2)

Here you can find the source of scale(BigDecimal b1, BigDecimal b2)

Description

scale

License

Apache License

Declaration

public static BigDecimal scale(BigDecimal b1, BigDecimal b2) 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.math.BigDecimal;

public class Main {
    public static BigDecimal scale(BigDecimal b1, BigDecimal b2) {
        return b1.divide(b2, 5).multiply(BigDecimal.valueOf(100));
    }/*ww  w. j av  a 2 s .  com*/
}

Related

  1. safeAdd(BigDecimal left, BigDecimal right)
  2. safeAddBD(BigDecimal bd1, BigDecimal bd2)
  3. safeNull(BigDecimal value)
  4. safeToBigDecimal(Object obj1)
  5. scalarMult(BigDecimal scalar, Vector a)
  6. scale2(BigDecimal valor)
  7. scaleCurrency(BigDecimal amount)
  8. secondsBigDecimalFromDuration(long s, int n)
  9. signum(final BigDecimal value)