Global/AngleRand

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (rephrased the output ranges)
Line 3: Line 3:
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
 +
|File=lua/includes/util.lua
 +
|Line=104-L106
 
}}
 
}}
 
{{Ret
 
{{Ret

Revision as of 21:23, 21 February 2019

 AngleRand( )

Contents

Description

Returns an angle with a randomized pitch, yaw and roll. The pitch is between -90 and 90 degrees, while yaw and roll are between -180 and 180 degrees.

Returns

Angle

The randomly generated angle.

Examples

Example

Prints out a random angle.

print( AngleRand() )

Output:

-6.949 113.388 130.879
Personal tools
Navigation