Here you can find the source of scale(BigDecimal b1, BigDecimal b2)
public static BigDecimal scale(BigDecimal b1, BigDecimal b2)
//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*/ }