Skip to content

Commit d604a0d

Browse files
authored
fix: Fixed description of math function (#817)
* fix: Fixed description of math.sqrt function * fix: fix math.asin description * Update lua.md
1 parent c4ebb48 commit d604a0d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/lua.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -652,7 +652,7 @@ local g = math.max(1, 2, 3) -- 3
652652
local h = math.min(1, 2, 3) -- 1
653653

654654
-- 返回参数的平方根
655-
local r = math.sqrt(3) -- 9
655+
local r = math.sqrt(9) -- 3
656656
```
657657

658658
### 工具方法
@@ -701,10 +701,10 @@ math.cos(math.pi) -- -1.0
701701
math.tan(math.pi / 4) -- 1.0
702702

703703
-- 反正弦方法(以下皆是以弧度表示)
704-
math.acos(1.0) -- 0.0
704+
math.asin(1.0) -- 1.5707963267949
705705
-- 反余弦方法
706-
math.acos(1.0) -- 1.5707963267949
707-
-- 反正弦方法
706+
math.acos(1.0) -- 0.0
707+
-- 反正切方法
708708
math.atan(1.0) -- 0.78539816339745
709709

710710
-- 角度转换为弧度

0 commit comments

Comments
 (0)