From 622aacaf446aeed82c729c4687eb8a7823b28afe Mon Sep 17 00:00:00 2001 From: RigelShrimp <34649368+RigelNana@users.noreply.github.com> Date: Wed, 14 May 2025 15:09:10 +0800 Subject: [PATCH] doc: fix typo in chinese translation (#305) --- docs/api/packages/mathutil.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docs/api/packages/mathutil.md b/docs/api/packages/mathutil.md index e3a6914..2a4f220 100644 --- a/docs/api/packages/mathutil.md +++ b/docs/api/packages/mathutil.md @@ -466,14 +466,14 @@ func main() { } ``` -### T运行cRound +### TruncRound

截短n位小数(不进行四舍五入)

函数签名: ```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 ``` 示例:[运行](https://go.dev/play/p/aumarSHIGzP) @@ -487,9 +487,9 @@ import ( ) func main() { - result1 := mathutil.T运行cRound(0.124, 2) - result2 := mathutil.T运行cRound(0.125, 2) - result3 := mathutil.T运行cRound(0.125, 3) + result1 := mathutil.TruncRound(0.124, 2) + result2 := mathutil.TruncRound(0.125, 2) + result3 := mathutil.TruncRound(0.125, 3) fmt.Println(result1) fmt.Println(result2)