Skip to content

Commit 1fc64fc

Browse files
authored
Merge pull request #2663 from 1312255201/patch-2
建议:修改RoundingMode的样例中注释采用的数据
2 parents abd12ca + 9f16424 commit 1fc64fc

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

docs/java/basis/bigdecimal.md

+8-8
Original file line numberDiff line numberDiff line change
@@ -99,20 +99,20 @@ public BigDecimal divide(BigDecimal divisor, int scale, RoundingMode roundingMod
9999

100100
```java
101101
public enum RoundingMode {
102-
// 2.5 -> 3 , 1.6 -> 2
103-
// -1.6 -> -2 , -2.5 -> -3
102+
// 2.4 -> 3 , 1.6 -> 2
103+
// -1.6 -> -2 , -2.4 -> -3
104104
UP(BigDecimal.ROUND_UP),
105-
// 2.5 -> 2 , 1.6 -> 1
106-
// -1.6 -> -1 , -2.5 -> -2
105+
// 2.4 -> 2 , 1.6 -> 1
106+
// -1.6 -> -1 , -2.4 -> -2
107107
DOWN(BigDecimal.ROUND_DOWN),
108-
// 2.5 -> 3 , 1.6 -> 2
109-
// -1.6 -> -1 , -2.5 -> -2
108+
// 2.4 -> 3 , 1.6 -> 2
109+
// -1.6 -> -1 , -2.4 -> -2
110110
CEILING(BigDecimal.ROUND_CEILING),
111111
// 2.5 -> 2 , 1.6 -> 1
112112
// -1.6 -> -2 , -2.5 -> -3
113113
FLOOR(BigDecimal.ROUND_FLOOR),
114-
// 2.5 -> 3 , 1.6 -> 2
115-
// -1.6 -> -2 , -2.5 -> -3
114+
// 2.4 -> 2 , 1.6 -> 2
115+
// -1.6 -> -2 , -2.4 -> -2
116116
HALF_UP(BigDecimal.ROUND_HALF_UP),
117117
//......
118118
}

0 commit comments

Comments
 (0)