Skip to content

Commit 7c3d6c3

Browse files
committed
add missing math function
1 parent cfcbeef commit 7c3d6c3

File tree

1 file changed

+27
-0
lines changed
  • crates/emmylua_code_analysis/resources/std

1 file changed

+27
-0
lines changed

crates/emmylua_code_analysis/resources/std/math.lua

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -207,4 +207,31 @@ function math.type(x) end
207207
---@return boolean
208208
function math.ult(m, n) end
209209

210+
---@version 5.1, JIT
211+
---
212+
--- Returns the value of `x` raised to the power `y`. (x^y)
213+
---@param x number The base
214+
---@param y number The exponent
215+
---@return number
216+
function math.pow(x, y) end
217+
218+
---@version 5.1, JIT
219+
---
220+
--- Returns the arc tangent of `y/x` (in radians), but uses the signs of both
221+
--- parameters to find the quadrant of the result. (It also handles correctly
222+
--- the case of `x` being zero.)
223+
---
224+
--- Note: In some Lua implementations, this function is equivalent to `math.atan(y, x)`.
225+
---@param y number
226+
---@param x number
227+
---@return number
228+
function math.atan2(y, x) end
229+
230+
---@version 5.1, JIT
231+
---
232+
--- Returns the base-10 logarithm of `x`.
233+
---@param x number
234+
---@return number
235+
function math.log10(x) end
236+
210237
return math

0 commit comments

Comments
 (0)