vector3 typing improvements

This commit is contained in:
Lera Elvoé 2025-02-23 16:12:18 +03:00
parent db4809d385
commit 3859c190d1
Signed by: yagich
SSH Key Fingerprint: SHA256:6xjGb6uA7lAVcULa7byPEN//rQ0wPoG+UzYVMfZnbvc

View File

@ -220,7 +220,6 @@ function Vector3:rotated(axis, angle)
return vaxis
end
---@diagnostic disable-next-line: undefined-field
vaxis = vaxis:normalized()
local cosa = math.cos(angle)
local sina = math.sin(angle)
@ -293,12 +292,18 @@ function Vector3:horizontal()
end
---- CONSTANTS
---@type Vector3
Vector3.UP = Vector3(0, 1, 0)
Vector3.DOWN = -Vector3.UP
---@type Vector3
Vector3.DOWN = Vector3(0, -1, 0)
---@type Vector3
Vector3.FORWARD = Vector3(0, 0, -1)
Vector3.BACK = -Vector3.FORWARD
---@type Vector3
Vector3.BACK = Vector3(0, 0, 1)
---@type Vector3
Vector3.RIGHT = Vector3(1, 0, 0)
Vector3.LEFT = -Vector3.RIGHT
---@type Vector3
Vector3.LEFT = Vector3(-1, 0, 0)
-------------------
return Vector3