|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.webkitchen.brainathlon.util.MathUtil
public class MathUtil
| Method Summary | |
|---|---|
static boolean |
nearlyEqual(double d1,
double d2,
double delta)
Returns true if abs(d1 - d2) <= delta |
static java.lang.String |
padInt(int theInt,
int length)
|
static double |
round(double val,
int places)
Round a double value to a specified number of decimal places. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
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 java.lang.String padInt(int theInt,
int length)
public static boolean nearlyEqual(double d1,
double d2,
double delta)
d1 - a value to compared2 - another value to comparedelta - the tolerated delta
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||