Doing a BigDecimal.ROUND_HALF_UP without using BigDecimal
807569Aug 9 2006 — edited Aug 9 2006Hi guys , is it possible to perform a round half up (like bigdecimal's function but without using BigDecimal.
I am trying to calculate a sales tax and the rounding rules states that for a tax rate of n%, a shelf price of p contains
(np/100 rounded up to the nearest 0.05) amount of sales tax. so a product costing 14.99 with 10% tax will therefore cost 16.49
I can get it done using BigDecimal's round half up function but i need to do it without using bigdecimal.
Any thoughts ?
Cheers.