Class RoundBD

All Implemented Interfaces:
PostfixMathCommandI, Serializable

public class RoundBD extends Round
Rounding functions using BigDecimals rounding method. See BigDecimal.setScale(int, RoundingMode). This should handle tricky cases like round(265.335,2) correctly. Support all the modes in RoundingMode as well as a mode compatible with Math.round(double). Two types of function are supported round(x) rounds to 0 decimal places and round(x,k) rounds to k decimal places. If the input value is a BigDecimal the result is also a BigDecimal, all other type of input Double, Integer give Double results.
Since:
Jep 4.1
Author:
Richard Morris
See Also: