DthingApi
|
Static Public Member Functions | |
static double | abs (double a) |
static float | abs (float a) |
static int | abs (int a) |
static long | abs (long a) |
static double | ceil (double d) |
static native double | cos (double d) |
static double | floor (double d) |
static double | max (double d1, double d2) |
static float | max (float f1, float f2) |
static int | max (int i1, int i2) |
static long | max (long l1, long l2) |
static double | min (double d1, double d2) |
static float | min (float f1, float f2) |
static int | min (int i1, int i2) |
static long | min (long l1, long l2) |
static long | round (double d) |
static int | round (float f) |
static double | signum (double d) |
static float | signum (float f) |
static native double | sin (double d) |
static native double | sqrt (double d) |
static native double | tan (double d) |
static double | toRadians (double angdeg) |
static double | toDegrees (double angrad) |
Static Public Attributes | |
static final double | E = 2.718281828459045 |
static final double | PI = 3.141592653589793 |
Class Math provides basic math constants and operations such as trigonometric functions, hyperbolic functions, exponential, logarithms, etc.
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns the absolute value of the argument.
If the argument is
,
is returned.
i | the value whose absolute value has to be computed. |
|
inlinestatic |
Returns the absolute value of the argument. If the argument is
,
is returned.
l | the value whose absolute value has to be computed. |
|
inlinestatic |
Returns the double conversion of the most negative (closest to negative infinity) integer value which is greater than the argument.
Special cases:
d | the value whose closest integer value has to be computed. |
|
static |
Returns the closest double approximation of the cosine of the argument. The returned result is within 1 ulp (unit in the last place) of the real result.
Special cases:
d | the angle whose cosine has to be computed, in radians. |
|
inlinestatic |
Returns the double conversion of the most positive (closest to positive infinity) integer value which is less than the argument.
Special cases:
d | the value whose closest integer value has to be computed. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns the most positive (closest to positive infinity) of the two arguments.
i1 | the first argument. |
i2 | the second argument. |
|
inlinestatic |
Returns the most positive (closest to positive infinity) of the two arguments.
l1 | the first argument. |
l2 | the second argument. |
|
inlinestatic |
|
inlinestatic |
|
inlinestatic |
Returns the most negative (closest to negative infinity) of the two arguments.
i1 | the first argument. |
i2 | the second argument. |
|
inlinestatic |
Returns the most negative (closest to negative infinity) of the two arguments.
l1 | the first argument. |
l2 | the second argument. |
|
inlinestatic |
Returns the result of rounding the argument to an integer. The result is equivalent to
.
Special cases:
d | the value to be rounded. |
|
inlinestatic |
Returns the result of rounding the argument to an integer. The result is equivalent to
.
Special cases:
f | the value to be rounded. |
|
inlinestatic |
Returns the signum function of the argument. If the argument is less than zero, it returns -1.0. If the argument is greater than zero, 1.0 is returned. If the argument is either positive or negative zero, the argument is returned as result.
Special cases:
d | the value whose signum has to be computed. |
|
inlinestatic |
Returns the signum function of the argument. If the argument is less than zero, it returns -1.0. If the argument is greater than zero, 1.0 is returned. If the argument is either positive or negative zero, the argument is returned as result.
Special cases:
f | the value whose signum has to be computed. |
|
static |
Returns the closest double approximation of the sine of the argument. The returned result is within 1 ulp (unit in the last place) of the real result.
Special cases:
d | the angle whose sin has to be computed, in radians. |
|
static |
Returns the closest double approximation of the square root of the argument.
Special cases:
d | the value whose square root has to be computed. |
|
static |
Returns the closest double approximation of the tangent of the argument. The returned result is within 1 ulp (unit in the last place) of the real result.
Special cases:
d | the angle whose tangent has to be computed, in radians. |
|
inlinestatic |
Returns the measure in degrees of the supplied radian angle. The result is
.
Special cases:
angrad | an angle in radians. |
|
inlinestatic |
Returns the measure in radians of the supplied degree angle. The result is
.
Special cases:
angdeg | an angle in degrees. |
|
static |
The double value closest to e, the base of the natural logarithm.
|
static |
The double value closest to pi, the ratio of a circle's circumference to its diameter.