gov.nasa.worldwind.util
| ||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Constructor Summary | |
|---|---|
WWMath()
|
|
| Method Summary | |
|---|---|
static double |
clamp(double v,
double min,
double max)
Clamps a value to a given range. |
static double |
convertHoursToMillis(double hours)
Converts time in hours to time in milliseconds. |
static double |
convertMetersToFeet(double meters)
converts meters to feet. |
static double |
convertMetersToMiles(double meters)
converts meters to miles. |
static double |
convertMillisToHours(double mills)
Converts time in milliseconds to time in hours. |
static double |
convertMillisToMinutes(double millis)
Converts time in milliseconds to time in minutes. |
static double |
convertMillisToSeconds(double millis)
Converts time in milliseconds to time in seconds. |
static double |
convertMinutesToMillis(double minutes)
Converts time in minutes to time in milliseconds. |
static double |
convertSecondsToMillis(double seconds)
Converts time in seconds to time in milliseconds. |
static boolean |
isPowerOfTwo(int value)
Convenience method for testing whether a value is a power of two. |
static double |
logBase2(double value)
Convenience method to compute the log base 2 of a value. |
static int |
powerOfTwoCeiling(int reference)
Returns the value that is the nearest power of 2 greater than or equal to the given value. |
static int |
powerOfTwoFloor(int reference)
Returns the value that is the nearest power of 2 less 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 double clamp(double v,
double min,
double max)
v - the value to clamp.min - the floor.max - the ceiling
public static double convertHoursToMillis(double hours)
hours - time in hours.
public static double convertMetersToFeet(double meters)
meters - the value in meters.
public static double convertMetersToMiles(double meters)
meters - the value in meters.
public static double convertMillisToHours(double mills)
mills - time in milliseconds.
public static double convertMillisToMinutes(double millis)
millis - time in milliseconds.
public static double convertMillisToSeconds(double millis)
millis - time in milliseconds.
public static double convertMinutesToMillis(double minutes)
minutes - time in minutes.
public static double convertSecondsToMillis(double seconds)
seconds - time in seconds.
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 powerOfTwoCeiling(int reference)
reference - the reference value. The power of 2 returned is greater than or equal to this value.
public static int powerOfTwoFloor(int reference)
reference - the reference value. The power of 2 returned is less 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 | ||||||||