public class Mathematics extends Object
public static float round(float f, int decimalPlaces) throws IllegalArgumentException
f
- float value to rounddecimalPlaces
- number of decimal places to round to, i.e. f = 2.991f and decimalPlaces = 2 returns 2.99fIllegalArgumentException
- if decimalPlaces < 0Copyright © 2013. All Rights Reserved.