public class Rounding extends Object
Constructor and Description |
---|
Rounding() |
Modifier and Type | Method and Description |
---|---|
static double |
round(double val,
int places)
Round a double alue to a specified number of decimal places.
|
static float |
round(float val,
int places)
Round a float value to a specified number of decimal
places.
|
static String |
toString(double d,
int place)
Rounds to place digits and transforms the double number d
to a string for printing
|
public static String toString(double d, int place)
d
- double the number to transformplace
- int the number of decimal digitspublic static double round(double val, int places)
val
- the value to be rounded.places
- the number of decimal places to round to.public static float round(float val, int places)
val
- the value to be rounded.places
- the number of decimal places to round to.Terrier Information Retrieval Platform4.1. Copyright © 2004-2015, University of Glasgow