This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import java.math.BigDecimal; | |
/** | |
* 由于Java的简单类型不能够精确的对浮点数进行运算,这个工具类提供精确的浮点数运算,包括加减乘除和四舍五入。 | |
*/ | |
public class Arith { // 默认除法运算精度 | |
private static final int DEF_DIV_SCALE = 10; // 这个类不能实例化 | |
private Arith() { | |
} |