Global/AngleRand

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
(Min/max args)
m (Line number updates)
Line 4: Line 4:
 
|IsClass=No
 
|IsClass=No
 
|File=lua/includes/util.lua
 
|File=lua/includes/util.lua
|Line=104-L106
+
|Line=100-L102
 
}}
 
}}
 
{{Arg
 
{{Arg

Revision as of 20:03, 5 June 2019

 AngleRand( )

Contents

Description

Returns an angle with a randomized pitch, yaw, and roll between [min, max).

Arguments

number min=-90 for pitch, -180 for yaw and roll

Min bound inclusive.


Next Update Change

This feature is only available in the next update.

Arguments

number max=90 for pitch, 180 for yaw and roll

Max bound exclusive.


Next Update Change

This feature is only available in the next update.

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