diff options
author | 最萌小汐 <sumneko@hotmail.com> | 2022-03-25 22:41:52 +0800 |
---|---|---|
committer | 最萌小汐 <sumneko@hotmail.com> | 2022-03-25 22:41:52 +0800 |
commit | c5ac7aa810c1f39c3c09de02b7d43be88e87b1f4 (patch) | |
tree | b4244b0f1c4b10a985c241d0d67b08db94f4b739 /meta | |
parent | 1e3c7a0c12d215fc5c61dff6e8f2091a678962ff (diff) | |
parent | f6b9b0e94764b7f950a4a0e7c41df12a75448edf (diff) | |
download | lua-language-server-c5ac7aa810c1f39c3c09de02b7d43be88e87b1f4.zip |
Merge commit 'f6b9b0e94764b7f950a4a0e7c41df12a75448edf' into 3.0
Diffstat (limited to 'meta')
-rw-r--r-- | meta/3rd/lovr/library/lovr.graphics.lua | 4 | ||||
-rw-r--r-- | meta/3rd/lovr/library/lovr.math.lua | 42 |
2 files changed, 46 insertions, 0 deletions
diff --git a/meta/3rd/lovr/library/lovr.graphics.lua b/meta/3rd/lovr/library/lovr.graphics.lua index f0ccb310..fe0b6c33 100644 --- a/meta/3rd/lovr/library/lovr.graphics.lua +++ b/meta/3rd/lovr/library/lovr.graphics.lua @@ -1450,6 +1450,10 @@ function Canvas:isStereo() end --- ---Returns a new Image containing the contents of a Texture attached to the Canvas. --- +--- +---### NOTE: +---The Image will have the same pixel format as the Texture that is read from. +--- ---@param index? number # The index of the Texture to read from. ---@return lovr.Image image # The new Image. function Canvas:newImage(index) end 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 |