-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathmath1.lua
More file actions
54 lines (43 loc) · 726 Bytes
/
math1.lua
File metadata and controls
54 lines (43 loc) · 726 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
-- print(math.pi)
-- print(math.rad(180))
-- print(math.deg(math.pi))
-- output
-- 3.1415926535898
-- 3.1415926535898
-- 180
-- print(math.sin(1))
-- print(math.cos(math.pi))
-- print(math.tan(math.pi / 4))
-- output
-- 0.8414709848079
-- -1
-- 1
-- print(math.atan(1))
-- print(math.asin(0))
-- output
-- 0.78539816339745
-- 0
-- print(math.max(-1, 2, 0, 3.6, 9.1))
-- print(math.min(-1, 2, 0, 3.6, 9.1))
-- output
-- 9.1
-- -1
-- print(math.fmod(10.1, 3))
-- print(math.sqrt(360))
--
-- output
-- 1.1
-- 18.97366596101
-- print(math.exp(1))
-- print(math.log(10))
-- print(math.log10(10))
--
-- output
-- 2.718281828459
-- 2.302585092994
-- 1
print(math.floor(3.1415))
print(math.ceil(7.998))
-- output
-- 3
-- 8