|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.rubecula.util.Math
public class Math
Field Summary | |
---|---|
static double |
EPSILON
a suitable discriminant for comparing numeric values. |
Constructor Summary | |
---|---|
Math()
|
Method Summary | |
---|---|
static int |
compare(double x,
double y)
Utility class method to compare two values with a tolerance of epsilon . |
static int |
compare(double x,
double y,
double epsilon)
Utility class method to compare two values with a tolerance of epsilon . |
static int |
compare(java.lang.Number x,
java.lang.Number y)
Utility class method to compare two values with a tolerance of epsilon . |
static int |
compare(java.lang.Number x,
java.lang.Number y,
double epsilon)
Utility class method to compare two values with a tolerance of epsilon . |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final double EPSILON
Constructor Detail |
---|
public Math()
Method Detail |
---|
public static int compare(double x, double y)
epsilon
. If the difference between x
and
y
is less than epsilon
, 0 is returned, else we
return the result of Double.compare(double, double)
for
x
and y
.
x
- y
-
public static int compare(double x, double y, double epsilon)
epsilon
. If the difference between x
and
y
is less than epsilon
, 0 is returned, else we
return the result of Double.compare(double, double)
for
x
and y
.
x
- y
- epsilon
-
public static int compare(java.lang.Number x, java.lang.Number y)
epsilon
. If the difference between x
and
y
is less than epsilon
, 0 is returned, else we
return the result of Double.compare(double, double)
for
x
and y
.
x
- y
-
public static int compare(java.lang.Number x, java.lang.Number y, double epsilon)
epsilon
. If the difference between x
and
y
is less than epsilon
, 0 is returned, else we
return the result of Double.compare(double, double)
for
x
and y
.
x
- y
- epsilon
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |