Skip to content

Commit 494892c

Browse files
author
coder_YT
committed
FIX:添加Float 类型 求模 错误示例
1 parent ebf4c9a commit 494892c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

1.2Float类型.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,8 @@
7878
print(factor1)
7979
//10.0
8080
//两者皆可以还原 q = (0.75 * factor + m) or (0.75 * factor1 + k)
81-
81+
let s = q % 0.75
82+
//Error: '%' is unavailable: For floating point numbers use truncatingRemainder instead('%'不可用:对于浮点数,请改用截断余数)
8283
>
8384
> - [精度拓展](./Code/NSDecimalNumber+YTExtension.swift)
8485

0 commit comments

Comments
 (0)