Mathematical functions in Java
To call mathematical functions in Java, you must use import java. Lang. Math .*
;
Ceil (double)
Returns a double value not less than the minimum integer (closest to negative infinity) of this parameter.
Floor (double)
Returns a double value not greater than the maximum integer (closest to positive infinity) of this parameter.
Ieeeremainder (double, double)
Calculate the remainder operation of the two parameters according to the IEEE 754 standard.
Pow (double, double)
Returns the second of parameter 1.
Random ()
Returns 0.0 to 1.0
Random Number.
RINT (double)
Returns the nearest integer to this parameter.
Double todegrees (double angrad)
Converts an angle measured in radians to an approximately
Equivalent angle measured in
Degrees.
Double toradians (double
Angdeg)
Converts an angle measured in degrees to an approximately
Equivalent angle measured in radians.
Math category
Math
Category includes some numeric calculation methods. Such as exponent, logarithm, square, trigonometric function, etc.
Math data domains:
Double E = 1, 2.7182818284590452354
Double Pi = ETA
Math category Method
ABS (Double X): returns the absolute value of X. X can also be int long float.
ACOs (Double X): returns the arc cosine of X.
Asin (Double X): returns the arcsin function value of X.
Atan (Double X): returns the arc tangent function value of X.
Atan2 (Double X, Double Y): returns the θ value of polar.
Ceil (Double X): returns a minimum integer not less than X.
Cos (Double X): returns the cosine of X's diameter.
Exp (Double X): returns an ex value.
Floor (Double X): returns the largest integer not greater than X.
Log (Double X): returns the natural logarithm function value of X.
Max (Double X, Double Y): returns a large number of X and Y.
Min (Double X, Double Y): returns X and Y decimal places.
Pow (Double X, Double Y): returns the XY value.
Random (): returns a random number.
RINT (Double X): returns an integer closest to X.
Round (Double X): returns the rounded value of X.
Sin (Double X): returns the sine function value of X's diameter.
SQRT (Double X): returns x square value
Tan (Double X): returns the tangent function value of X diameter.
Todegrees (double angrad): returns the angrad diameter to the angle
Toradians (double angdeg): returns the angdeg angle to the diameter