* @param a_RoundingMode
     * @return x rounded to decimalPlaces if the scale of x is greater than
     * decimal places. Otherwise returns x.
     */
    public static BigDecimal roundIfNecessary(
            BigDecimal x,
            int decimalPlaces,
            RoundingMode a_RoundingMode) {
        if (x.scale() > decimalPlaces) {
            return roundIfNecessaryNoScaleCheck(
                    x,
                    decimalPlaces,
                    a_RoundingMode);
        }
        return x;
    }