JAVA mathematical functions and constants

In JAVA, without exponentiation, and therefore we need the help of pow Math class methods.

double y = Math.pow(x,a)

Math class provides some common trigonometric functions:

Math.sin

Math.cos

Math.tan

Simplified method:

In mathematics need not name, add a prefix in front of the method name "Math"

You can use the following method:

import static java.lang.Math.*;

 

Guess you like

Origin www.cnblogs.com/zhichun/p/11613642.html