From GMod Wiki
Revision as of 17:25, 10 February 2011 by garry :D
The angle object is derived from Vector
An angle can be created using the 'Angle(Pitch, Yaw, Roll)' command.
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