|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectjava.lang.Math
public class Math
Math provides basic mathematical functions.
| Field Summary | |
|---|---|
static double |
E
value of "E" |
static double |
PI
value of "PI" |
| Method Summary | |
|---|---|
static double |
abs(double a)
abs returns the absolute value of a doublie. |
static float |
abs(float a)
abs returns the absolute value of a float. |
static int |
abs(int a)
abs returns the absolute value. |
static long |
abs(long a)
abs returns the absolute value. |
static double |
acos(double a)
acos calculates the arc cosine function. |
static double |
asin(double a)
asin calculates the arc sine function. |
static double |
atan(double a)
atan calculates the arc tangent function. |
static double |
atan2(double a,
double b)
atan2 calculates the atan2 function, i.e., converts euclidic coordinates to the angle in polar coordinates. |
static double |
cbrt(double a)
cbrt calculates the cubic root. |
static double |
ceil(double a)
ceil calculates the ceiling function. |
static double |
cos(double a)
cos calculates the cosine function. |
static double |
cosh(double x)
Calculates the hyperbolic cosine of x. |
static double |
exp(double a)
exp calculates the exp function. |
static double |
expm1(double x)
expm1 |
static double |
floor(double a)
floor calculates the floor function. |
static double |
hypot(double x,
double y)
hypot |
static double |
IEEEremainder(double f1,
double f2)
IEEEremainder calculates the remainder of 2 values as defined in IEEE 754 standard. |
static double |
log(double a)
log calculates the log function to base E. |
static double |
log10(double a)
log10 calculates the log function to base 10. |
static double |
log1p(double x)
log1p |
static double |
max(double a,
double b)
max determines the larger of two values |
static float |
max(float a,
float b)
max determines the larger of two values |
static int |
max(int a,
int b)
max returns the maximum of a and b. |
static long |
max(long a,
long b)
max returns the maximum of a and b. |
static double |
min(double a,
double b)
min determines the smaller of two values |
static float |
min(float a,
float b)
min determines the smaller of two values |
static int |
min(int a,
int b)
min returns the minimum of a and b. |
static long |
min(long a,
long b)
min returns the minimum of a and b. |
static double |
pow(double a,
double b)
pow raises an argument to the power of another argument. |
static double |
random()
random returns a new double random number. |
static double |
rint(double a)
rint rounds a double to the closest integer value. |
static long |
round(double a)
round rounds a double to the closets long value. |
static int |
round(float a)
round rounds a float to the closest integer value. |
static double |
signum(double d)
signum |
static float |
signum(float f)
signum |
static double |
sin(double a)
sin calculates the sine function. |
static double |
sinh(double x)
Calculates the hyperbolic sine of x. |
static double |
sqrt(double a)
sqrt calculates the square root. |
static double |
tan(double a)
tan calculates the tangent function. |
static double |
tanh(double x)
Calculates the hyberbolic tangent of x. |
static double |
toDegrees(double radians)
toDegrees converst an angle given in radians (circle=2*PI) to degrees (circle=360). |
static double |
toRadians(double degrees)
toRadians converts an angle given in degrees (circle=360) to radians (circle=2*PI). |
static double |
ulp(double d)
ulp |
static float |
ulp(float f)
ulp |
| 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 - argument to sine.
public static double cos(double a)
a - argument to cosine.
public static double tan(double a)
a - argument to tangent.
public static double asin(double a)
a - argument to arc sine.
public static double acos(double a)
a - argument to arc cosine.
public static double atan(double a)
a - argument to arc tangent.
public static double toRadians(double degrees)
degrees - the angle in degrees.
public static double toDegrees(double radians)
radians - the angle in radians.
+ @since 1.2
public static double exp(double a)
a - argument to exp function.
public static double log(double a)
a - argument to log function.
public static double log10(double a)
a - argument to log function.
public static double sqrt(double a)
a - argument to square root.
public static double cbrt(double a)
a - argument to cubic root.
public static double IEEEremainder(double f1,
double f2)
f1 - the first argument.f2 - the second argument.
public static double ceil(double a)
a - argument to ceiling function.
public static double floor(double a)
a - argument to floor function.
public static double rint(double a)
a - argument to rint.
public static double atan2(double a,
double b)
a - the x coordinate.b - the y coordinate.
public static double pow(double a,
double b)
a - the first argument.b - the second argument.
public static int round(float a)
a - a float value.
public static long round(double a)
a - a double value.
public static double random()
This function uses a private instance of java.util.Random(). It is thread-safe.
public static int abs(int a)
a - an integer.
public static long abs(long a)
a - a long.
public static float abs(float a)
a - a float.
public static double abs(double a)
a - a double.
public static int max(int a,
int b)
a - first valueb - second value
public static long max(long a,
long b)
a - first valueb - second value
public static float max(float a,
float b)
a - the first valueb - the second value
public static double max(double a,
double b)
a - the first valueb - the second value
public static int min(int a,
int b)
a - first valueb - second value
public static long min(long a,
long b)
a - first valueb - second value
public static float min(float a,
float b)
a - the first valueb - the second value
public static double min(double a,
double b)
a - the first valueb - the second value
public static double ulp(double d)
d -
public static float ulp(float f)
f -
public static double signum(double d)
d -
public static float signum(float f)
f -
public static double sinh(double x)
x.
x - the parameter to sinh
public static double cosh(double x)
x.
x - the parameter to cosh
public static double tanh(double x)
x.
the - parameter to tanh
public static double hypot(double x,
double y)
x - y -
public static double expm1(double x)
x -
public static double log1p(double x)
x -
|
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||