|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.terrier.utility.Rounding
public class Rounding
A class for performing the rounding of a number in various ways for various applications.
Constructor Summary | |
---|---|
Rounding()
|
Method Summary | |
---|---|
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 java.lang.String |
toString(double d,
int place)
Rounds to place digits and transforms the double number d to a string for printing |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public Rounding()
Method Detail |
---|
public static java.lang.String toString(double d, int place)
d
- double the number to transformplace
- int the number of decimal digits
public 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.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |