Update 02_Basic_Operators.md (#1211)

精准描述求余操作符,尤其是对负数求余
This commit is contained in:
Andrew
2022-12-04 20:19:36 -05:00
committed by GitHub
parent ef29944f75
commit 8c24b2e9c8

View File

@ -106,7 +106,7 @@ Swift 中所有数值类型都支持了基本的四则*算术运算符*
-9 % 4 // 等于 -1
```
`-9``4` 代入等式,`-2` 是取到的最大整数:
`-9``4` 代入等式,`-2`使 `余数``-9` 同符号时能取到的最大整数:
-9 = (4 × -2) + -1