|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.deegree.commons.utils.math.MathUtils
public class MathUtils
MathUtils
Field Summary | |
---|---|
static double |
EPSILON
|
static double |
SQRT2
The value of sqrt(2) |
Constructor Summary | |
---|---|
MathUtils()
|
Method Summary | |
---|---|
static boolean |
isZero(double v)
|
static int |
nextPowerOfTwoValue(double value)
This method will return the next power of two for the given value, e.g. if value is 511 it will return 512, if value is 513 it will return 1024. |
static int |
previousPowerOfTwo(double value)
This method will return the next power, two must be raised too to give the next power of two, e.g. if value is 511 it will return 9, if value is 513 it will return 10. |
static int |
round(double v)
Helper to round a double value to an int without the need to cast. |
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
public static final double SQRT2
Constructor Detail |
---|
public MathUtils()
Method Detail |
---|
public static int round(double v)
v
-
public static boolean isZero(double v)
v
-
public static int previousPowerOfTwo(double value)
value
- to use
public static int nextPowerOfTwoValue(double value)
value
- to use
|
deegree-core-3.0-pre-nightly (2010/03/05 00:01) - official | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |