Method setScale(int newScale, int roundingMode)
Return type:
java.math.BigDecimal
Member of:
java.math.BigDecimal
[
api documentation
] [
main menu
]
Examples of how the element is used
(one line per example):
[
add your own example
]
1
b = b.setScale(2, BigDecimal.ROUND_HALF_EVEN);
2
aValue.setScale(0, BigDecimal.ROUND_UNNECESSARY);
3
bd = bd.setScale (0, java.math.BigDecimal.ROUND_HALF_DOWN);
4
scaledUpBd = scaledUpBd.setScale (0, java.math.BigDecimal.ROUND_HALF_DOWN);
5
Discount = Discount.setScale(2, BigDecimal.ROUND_HALF_UP);
6
myConstant = myConstant.setScale(this.getScale(), this.getRoundingMode());
7
PayAmt = PayAmt.multiply(CurrencyRate).setScale(2, BigDecimal.ROUND_HALF_UP);
8
bigdecimal = bigdecimal.setScale(digits, roundingMode);
9
bdVal = (bdVal.doubleValue() < 0) ? bdVal.setScale(scaleVal.intValue(),
Java and J2SE are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other Countries.