Skip to content

Commit 8c24b2e

Browse files
authored
Update 02_Basic_Operators.md (#1211)
精准描述求余操作符,尤其是对负数求余
1 parent ef29944 commit 8c24b2e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

source/02_language_guide/02_Basic_Operators.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ Swift 中所有数值类型都支持了基本的四则*算术运算符*:
106106
-9 % 4 // 等于 -1
107107
```
108108

109-
`-9``4` 代入等式,`-2` 是取到的最大整数
109+
`-9``4` 代入等式,`-2` 是使 `余数``-9` 同符号时能取到的最大整数
110110

111111
-9 = (4 × -2) + -1
112112

0 commit comments

Comments
 (0)