Skip to content

angle_t

local vec = angle_t(89, 180, 0)
print(vec)

Fields#

Field Description
x
float
y
float
z
float

Operators#

local x = angle_t(60, 100, 0)
local y = angle_t(50, 50, 0)

print(x) -- prints formatted
print(x[2]) -- prints y
x[2] = 40 -- sets y to 40
print(x == y) -- prints if x is equal to y
print(x + y) -- prints result of addition
print(x - y) -- prints result of subtraction
print(x / y) -- prints result of division
print(x * y) -- prints result of multiplication
print(-x) -- prints result of inversed x
print(#x) -- prints length of x

Functions#

clamp#

clamps the current angle to csgo angle bounds

void clamp()

clamped#

returns a clamped angle and leaves the current angle untouched

angle_t clamped()

to_vector#

returns the corresponding forward, right and up vectors

float, float, float to_vector()