Global/AngleRand

From Garry's Mod
(Difference between revisions)
Jump to: navigation, search
m (Line number updates)
Line 1: Line 1:
 
{{Func
 
{{Func
|Description=Returns an angle with a randomized pitch, yaw, and roll between [min, max).
+
|Description=Returns an angle with a randomized pitch, yaw, and roll between <nowiki>[</nowiki>min, max).
 
|Realm=Shared and Menu
 
|Realm=Shared and Menu
 
|IsClass=No
 
|IsClass=No
Line 11: Line 11:
 
|default=-90 for pitch, -180 for yaw and roll
 
|default=-90 for pitch, -180 for yaw and roll
 
|desc=Min bound inclusive.
 
|desc=Min bound inclusive.
 
{{NextUpdate}}
 
 
}}
 
}}
 
{{Arg
 
{{Arg
Line 19: Line 17:
 
|default=90 for pitch, 180 for yaw and roll
 
|default=90 for pitch, 180 for yaw and roll
 
|desc=Max bound exclusive.
 
|desc=Max bound exclusive.
 
{{NextUpdate}}
 
 
}}
 
}}
 
{{Ret
 
{{Ret

Revision as of 17:42, 2 July 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.

Arguments

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

Max bound exclusive.

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