@Override public int getMathScale() { return delegate.getMathScale(); }
@Override public int getMathScale() { Integer scale = FEATURES.get().mathScale; return scale == null ? super.getMathScale() : scale.intValue(); }
/** * Ensure a big decimal is rounded by this arithmetic scale and rounding mode. * @param number the big decimal to round * @return the rounded big decimal * @since 2.1 */ public BigDecimal roundBigDecimal(final BigDecimal number) { int mscale = getMathScale(); if (mscale >= 0) { return number.setScale(mscale, getMathContext().getRoundingMode()); } else { return number; } }