diff --git a/.luacheckrc b/.luacheckrc index 6d21f31..3dcbf46 100644 --- a/.luacheckrc +++ b/.luacheckrc @@ -51,7 +51,8 @@ read_globals = { fields = { "hypot", "sign", - "factorial" + "factorial", + "round", } }, diff --git a/types/math.type.lua b/types/math.type.lua new file mode 100644 index 0000000..4d62d97 --- /dev/null +++ b/types/math.type.lua @@ -0,0 +1,7 @@ +---https://github.com/sumneko/lua-language-server/wiki + +---@alias mathlib mathlib|MathAbstract + +---Math helpers +---@class MathAbstract +---@field round fun(x: number): number Returns `x` rounded to the nearest integer. At a multiple of 0.5, rounds away from zero.