I use, for better or worse,
public final static double roundDouble( double d, int places ) {
BigDecimal bd = new BigDecimal( Double.toString(d) );
bd = bd.setScale( places, BigDecimal.ROUND_HALF_UP);
return bd.doubleValue();
}
Pent
--
You received this message because you are subscribed to the Google
Groups "Android Developers" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/android-developers?hl=en