public static BigDecimal setScale ( final BigDecimal bd , final Integer scale , final int rounding ) { if ( bd != null && scale != null ) { return bd . setScale ( scale , rounding ) ; } return null ; }
returns a new BigDecimal with correct Scales . PERCENT_SCALE . This is used by the table renderer .