diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-19 16:46:41 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-19 16:46:41 +0800 |
commit | 686f56f839adca75767bf2cf4623536e70f6b58b (patch) | |
tree | 9984befae8f5c026e02a9da839193e1cc29fbe14 /meta/3rd | |
parent | 20d4be8bc74d6a78372f50112288fb6c4406b841 (diff) | |
download | lua-language-server-686f56f839adca75767bf2cf4623536e70f6b58b.zip |
update submodules
Diffstat (limited to 'meta/3rd')
-rw-r--r-- | meta/3rd/lovr/library/lovr.math.lua | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/meta/3rd/lovr/library/lovr.math.lua b/meta/3rd/lovr/library/lovr.math.lua index 7cf348c6..3ce62dd9 100644 --- a/meta/3rd/lovr/library/lovr.math.lua +++ b/meta/3rd/lovr/library/lovr.math.lua @@ -644,6 +644,20 @@ local Vec2 = {} function Vec2:add(u) end --- +---Returns the angle between vectors. +--- +--- +---### NOTE: +---If any of the two vectors have a length of zero, the angle between them is not well defined. +--- +---In this case the function returns `math.pi / 2`. +--- +---@overload fun(self: lovr.Vec2, x: number, y: number):number +---@param u lovr.Vec2 # The other vector. +---@return number angle # The angle to the other vector, in radians. +function Vec2:angle(u) end + +--- ---Returns the distance to another vector. --- ---@overload fun(self: lovr.Vec2, x: number, y: number):number @@ -749,6 +763,20 @@ local Vec3 = {} function Vec3:add(u) end --- +---Returns the angle between vectors. +--- +--- +---### NOTE: +---If any of the two vectors have a length of zero, the angle between them is not well defined. +--- +---In this case the function returns `math.pi / 2`. +--- +---@overload fun(self: lovr.Vec3, x: number, y: number, z: number):number +---@param u lovr.Vec3 # The other vector. +---@return number angle # The angle to the other vector, in radians. +function Vec3:angle(u) end + +--- ---Sets this vector to be equal to the cross product between this vector and another one. --- ---The new `v` will be perpendicular to both the old `v` and `u`. @@ -873,6 +901,20 @@ local Vec4 = {} function Vec4:add(u) end --- +---Returns the angle between vectors. +--- +--- +---### NOTE: +---If any of the two vectors have a length of zero, the angle between them is not well defined. +--- +---In this case the function returns `math.pi / 2`. +--- +---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number +---@param u lovr.Vec4 # The other vector. +---@return number angle # The angle to other vector, in radians. +function Vec4:angle(u) end + +--- ---Returns the distance to another vector. --- ---@overload fun(self: lovr.Vec4, x: number, y: number, z: number, w: number):number |