forked from JavaDevTeam/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava-math-Math.java
More file actions
53 lines (37 loc) · 787 Bytes
/
java-math-Math.java
File metadata and controls
53 lines (37 loc) · 787 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
--------------------
Math |
--------------------
# 包含了大量的静态方法,用于数学计算
double abs(double a);
* 返回绝对值
double max(double a,double b);
double min(double a,double b);
* 返回较大/小的一个
double sin(double theta);
* 正余弦函数
double cos(double theta);
* 余弦函数
double tan(double threa);
* 正切函数
double asin(double theta);
double acos(double theta);
double atan(double threa);
double exp(double a);
* 指数函数
double log(double a);
* 自然对数函数
double pow(double a,double b);
* a的b次方
double random();
* 0 - 1 的随机数
double sqrt(double a);
* a的平方根
int round(float a)
* 四舍五入
double floor(double a)
* 向下取整
# 静态属性
E
* 常数e
PI
* 常数π