1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-15 02:02:27 +08:00

doc: fix typo in chinese translation (#305)

This commit is contained in:
RigelShrimp
2025-05-14 15:09:10 +08:00
committed by GitHub
parent e78ac65605
commit 622aacaf44

View File

@@ -466,14 +466,14 @@ func main() {
} }
``` ```
### <span id="T运行cRound">T运行cRound</span> ### <span id="TruncRound">TruncRound</span>
<p>截短n位小数不进行四舍五入</p> <p>截短n位小数不进行四舍五入</p>
<b>函数签名:</b> <b>函数签名:</b>
```go ```go
func T运行cRound[T constraints.Float | constraints.Integer](x T, n int) T func TruncRound[T constraints.Float | constraints.Integer](x T, n int) T
``` ```
<b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/aumarSHIGzP)</span></b> <b>示例:<span style="float:right;display:inline-block;">[运行](https://go.dev/play/p/aumarSHIGzP)</span></b>
@@ -487,9 +487,9 @@ import (
) )
func main() { func main() {
result1 := mathutil.T运行cRound(0.124, 2) result1 := mathutil.TruncRound(0.124, 2)
result2 := mathutil.T运行cRound(0.125, 2) result2 := mathutil.TruncRound(0.125, 2)
result3 := mathutil.T运行cRound(0.125, 3) result3 := mathutil.TruncRound(0.125, 3)
fmt.Println(result1) fmt.Println(result1)
fmt.Println(result2) fmt.Println(result2)