From 686f56f839adca75767bf2cf4623536e70f6b58b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=80=E8=90=8C=E5=B0=8F=E6=B1=90?= Date: Sat, 19 Mar 2022 16:46:41 +0800 Subject: update submodules --- meta/3rd/lovr/library/lovr.math.lua | 42 +++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) (limited to 'meta/3rd/lovr') 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 @@ -643,6 +643,20 @@ local Vec2 = {} ---@return lovr.Vec2 v # The original vector. 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. --- @@ -748,6 +762,20 @@ local Vec3 = {} ---@return lovr.Vec3 v # The original vector. 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. --- @@ -872,6 +900,20 @@ local Vec4 = {} ---@return lovr.Vec4 v # The original vector. 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. --- -- cgit debian/1.2.3+git2.25.1-1-2-gaceb0