forked from JavaDevTeam/notes
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathjava-math.java
More file actions
33 lines (29 loc) · 614 Bytes
/
java-math.java
File metadata and controls
33 lines (29 loc) · 614 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
--------------------
|
--------------------
Math
BigDecimal
BigInteger
--------------------
Math |
--------------------
Math 类
用于执行基本数学运算的方法。
Math.ceil(指定值);
|--返回大于指定数据的最小整数。
Math.floor(指定值);
|--返回小余指定数据的最大整数。
Math.round(指定值)
|--对指定值进行四舍五入。
Math.pow(x,y);
|--返回x值的。y次幂。
Math.random();
|--返回一个包含0,不包含1的随机数。
Math.max(x,y);
|--返回俩值中比较大的一个。返回值就是该数值类型。
--------------------
BigDecimal |
--------------------
--------------------
BigInteger |
--------------------