|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object | +--java.lang.Math
The standard Math library. For the methods in this Class, error handling for out-of-range or immeasurable results are platform dependent. This class cannot be subclassed or instantiated because all methods and variables are static.
| Field Summary | |
static double |
E
The float representation of the value E. |
static double |
PI
The float representation of the value Pi. |
| Method Summary | |
static double |
abs(double a)
Returns the absolute double value of a. |
static float |
abs(float a)
Returns the absolute float value of a. |
static int |
abs(int a)
Returns the absolute integer value of a. |
static long |
abs(long a)
Returns the absolute long value of a. |
static double |
acos(double a)
Returns the arc cosine of a, in the range of 0.0 through Pi. |
static double |
asin(double a)
Returns the arc sine of a, in the range of -Pi/2 through Pi/2. |
static double |
atan(double a)
Returns the arc tangent of a, in the range of -Pi/2 through Pi/2. |
static double |
atan2(double a,
double b)
Converts rectangular coordinates (a, b) to polar (r, theta). |
static double |
ceil(double a)
Returns the "ceiling" or smallest whole number greater than or equal to a. |
static double |
cos(double a)
Returns the trigonometric cosine of an angle. |
static double |
exp(double a)
Returns the exponential number e(2.718...) raised to the power of a. |
static double |
floor(double a)
Returns the "floor" or largest whole number less than or equal to a. |
static double |
IEEEremainder(double f1,
double f2)
Returns the remainder of f1 divided by f2 as defined by IEEE 754. |
static double |
log(double a)
Returns the natural logarithm (base e) of a. |
static double |
max(double a,
double b)
Takes two double values, a and b, and returns the greater number of the two. |
static float |
max(float a,
float b)
Takes two float values, a and b, and returns the greater number of the two. |
static int |
max(int a,
int b)
Takes two int values, a and b, and returns the greater number of the two. |
static long |
max(long a,
long b)
Takes two long values, a and b, and returns the greater number of the two. |
static double |
min(double a,
double b)
Takes two double values, a and b, and returns the smallest number of the two. |
static float |
min(float a,
float b)
Takes two float values, a and b, and returns the smallest number of the two. |
static int |
min(int a,
int b)
Takes two integer values, a and b, and returns the smallest number of the two. |
static long |
min(long a,
long b)
Takes two long values, a and b, and returns the smallest number of the two. |
static double |
pow(double a,
double b)
Returns the number a raised to the power of b. |
static double |
random()
Generates a random number between 0.0 and 1.0. |
static double |
rint(double a)
Converts a double value into an integral value in double format. |
static long |
round(double a)
Rounds off a double value by first adding 0.5 to it and then returning the largest integer that is less than or equal to this new value. |
static int |
round(float a)
Rounds off a float value by first adding 0.5 to it and then returning the largest integer that is less than or equal to this new value. |
static double |
sin(double a)
Returns the trigonometric sine of an angle. |
static double |
sqrt(double a)
Returns the square root of a. |
static double |
tan(double a)
Returns the trigonometric tangent of an angle. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final double E
public static final double PI
| Method Detail |
public static double sin(double a)
a - an assigned angle that is measured in radianspublic static double cos(double a)
a - an assigned angle that is measured in radianspublic static double tan(double a)
a - an assigned angle that is measured in radianspublic static double asin(double a)
a - (-1.0) <= a <= 1.0public static double acos(double a)
a - (-1.0) <= a <= 1.0public static double atan(double a)
a - an assigned value
public static double exp(double a)
a - an assigned valuepublic static double log(double a)
a - a is a number greater than 0.0public static double sqrt(double a)
a - a is a number greater than or equal to 0.0
public static double IEEEremainder(double f1,
double f2)
f1 - the dividendf2 - the divisorpublic static double ceil(double a)
a - an assigned valuepublic static double floor(double a)
a - an assigned valuepublic static double rint(double a)
a - an assigned double value
public static double atan2(double a,
double b)
a - an assigned valueb - an assigned value
public static double pow(double a,
double b)
a - an assigned value with the exceptions: (a == 0.0) -> (b > 0.0)
&& (a <= 0.0) -> (b == a whole number)b - an assigned value with the exceptions: (a == 0.0) -> (b > 0.0)
&& (a <= 0.0) -> (b == a whole number)
ArithmeticException - If (a == 0.0) and (b <= 0.0) .
ArithmeticException - If (a <= 0.0) and b is not equal to
a whole number.public static int round(float a)
a - the value to be rounded offpublic static long round(double a)
a - the value to be rounded offpublic static double random()
Random number generators are often referred to as pseudorandom number generators because the numbers produced tend to repeat themselves after a period of time.
public static int abs(int a)
a - an assigned integer valuepublic static long abs(long a)
a - an assigned long value.public static float abs(float a)
a - an assigned float valuepublic static double abs(double a)
a - an assigned double value
public static int max(int a,
int b)
a - an integer value to be comparedb - an integer value to be compared
public static long max(long a,
long b)
a - a long value to be comparedb - a long value to be compared
public static float max(float a,
float b)
a - a float value to be comparedb - a float value to be compared
public static double max(double a,
double b)
a - a double value to be comparedb - a double value to be compared
public static int min(int a,
int b)
a - an integer value to be comparedb - an integer value to be compared
public static long min(long a,
long b)
a - a long value to be comparedb - a long value to be compared
public static float min(float a,
float b)
a - a float value to be comparedb - a float value to be compared
public static double min(double a,
double b)
a - a double value to be comparedb - a double value to be compared
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||