Angle
From GMod Wiki
The angle object is derived from Vector
An angle can be created using the 'Angle(Pitch, Yaw, Roll)' command.
Angle (Object)
Angle:__add
Angle:__eq
Angle:__gc
Angle:__index
Angle:__mul
Angle:__newindex
Angle:__sub
Angle:__tostring
Angle:Forward
Angle:Right
Angle:RotateAroundAxis
Angle:Up
Code examples
Creating an angle
local angle = Angle( 20, 90, 0 ) //Creates angle where: Pitch = 20deg, Yaw = 90deg, Roll = 0deg Msg(tostring(angle) .. "\n")
Reading components of an angle
Msg(tostring(angle.p)) //Prints Pitch component of angle Msg(tostring(angle.y)) //Prints Yaw component of angle Msg(tostring(angle.r)) //Prints Roll component of angle
Semi-Related math (Library)
math.AngleDifference
math.ApproachAngle
math.NormalizeAngle