Math is a mathematical class in Java, which records many of them.ProgramMathematical aspects to be used, such as two constants:
The circumference rate of the math. Pi record
Math. E records the constant of E.
Math has some similar constants, which are commonly used in Engineering Mathematics.
Math. Abs evaluate absolute value
Math. Sin sine function & nbsp; math. asin arcsin Function
Math. Cos cosine function & nbsp; math. ACOs arccosine Function
Math. Tan tangent function & nbsp; math. atan arc tangent function
The arctangent function of math. atan2
Math. todegrees converts radians to degrees
Math. toradians angle conversion to radians
Math. Ceil returns the maximum integer not less than a certain number.
Math. Floor returns the maximum integer not greater than a certain number.
Math. ieeeremainder evaluate the remainder
Math. MAX: calculate the maximum of two numbers.
Math. Min: Calculate the minimum of two numbers.
Math. SQRT
Math. Pow calculates the arbitrary power of a number and throws an arithmeticexception to handle an overflow exception.
Math. Exp: Evaluate the arbitrary power of e
Math. log10 base-10 logarithm
Math. Log natural logarithm
Math. RINT: Calculate the integer closest to a certain number (which may be larger or smaller than a certain number)
Math. Round is the same as above. Int or long type is returned (double type is returned for the previous function)
Math. Random returns a random number between 0 and 1.
Note: Although math. RINT and math. round is very similar, but it is still different, not as good as math. RINT (-5.5) =-6.0 while math. round (-5.5) =-5. This is another difference between RINT and round.