|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectgov.nasa.worldwind.util.WWMath
public class WWMath
A collection of useful math methods, all static.
Constructor Summary | |
---|---|
WWMath()
|
Method Summary | |
---|---|
static boolean |
isPowerOfTwo(int value)
Convenience method for testing is a value is a power of two. |
static double |
logBase2(double value)
Convenience method to compute the log-2 of a value. |
static int |
nearestPowerOfTwo(int reference)
Returns a resolution value that is the nearest power of 2 greater than or equal to the given value. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WWMath()
Method Detail |
---|
public static boolean isPowerOfTwo(int value)
value
- the value to test for power of 2
public static double logBase2(double value)
value
- the value to take the log of.
public static int nearestPowerOfTwo(int reference)
reference
- the reference value. The power of 2 returned is greater than or equal to this value.
|
NASA World Wind | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |