angle_t
Fields#
| Field | Description |
|---|---|
xfloat |
|
yfloat |
|
zfloat |
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
clamped#
returns a clamped angle and leaves the current angle untouched
to_vector#
returns the corresponding forward, right and up vectors