-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMath.lua
More file actions
116 lines (98 loc) · 2.41 KB
/
Copy pathMath.lua
File metadata and controls
116 lines (98 loc) · 2.41 KB
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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
---
--- Generated by EmmyLua(https://github.com/EmmyLua)
--- Created by conta.
--- DateTime: 12/3/2025 4:47 AM
---
---@class Math Mathematical utility functions
Math = {
Pi = 3.14159265358979323846,
Tau = 6.28318530717958647692,
E = 2.71828182845904523536,
}
---Return the minimum of two numbers
---@param a number First value
---@param b number Second value
---@return number Minimum value
function Math:Min(a, b)
end
---Return the maximum of two numbers
---@param a number First value
---@param b number Second value
---@return number Maximum value
function Math:Max(a, b)
end
---Clamp a value between two bounds
---@param a number First value
---@param b number Second value
---@return number Clamped value
function Math:Clamp(a, b)
end
---Calculate square root
---@param a number Input value
---@return number Square root
function Math:Sqrt(a)
end
---Raise to power
---@param a number Base
---@param b number Exponent
---@return number Result
function Math:Pow(a, b)
end
---Calculate sine
---@param a number Angle in radians
---@return number Sine value
function Math:Sin(a)
end
---Calculate cosine
---@param a number Angle in radians
---@return number Cosine value
function Math:Cos(a)
end
---Calculate tangent
---@param a number Angle in radians
---@return number Tangent value
function Math:Tan(a)
end
---Round down to nearest integer
---@param a number Input value
---@return number Floor value
function Math:Floor(a)
end
---Round up to nearest integer
---@param a number Input value
---@return number Ceiling value
function Math:Ceil(a)
end
---Round to nearest integer
---@param a number Input value
---@return number Rounded value
function Math:Round(a)
end
---Convert degrees to radians
---@param a number Angle in degrees
---@return number Angle in radians
function Math:DegToRad(a)
end
---Convert radians to degrees
---@param a number Angle in radians
---@return number Angle in degrees
function Math:RadToDeg(a)
end
---Generate random number between 0 and 1
---@return number Random value [0, 1]
function Math:Random()
end
---Generate random number between min and max
---@param min number
---@param max number
---@return number Random value [min, max]
function Math:RandomInt(min, max)
end
---Linear interpolation between two values
---@param a number Start value
---@param b number End value
---@param t number Interpolation factor [0, 1]
---@return number Interpolated value
function Math:Lerp(a, b, t)
end
return Math