Garry's Mod Wiki

Angle

Angle Angle( number pitch = 0, number yaw = 0, number roll = 0 )

Description

Creates an Angle object.

Arguments

1 number pitch = 0
The pitch value of the angle.

If this is an Angle, this function will return a copy of the given angle.

If this is a string, this function will try to parse the string as a angle. If it fails, it returns a 0 angle. (See examples)

2 number yaw = 0
The yaw value of the angle.
3 number roll = 0
The roll value of the angle.

Returns

1 Angle
Created angle

Example

Creates an angle and prints the value to the console.

print( Angle( 1, 2, 3 ) ) print( Angle( "4 5 6" ) ) local test = Angle( 7, 8, 9 ) print( Angle( test ) ) print( Angle( "4 5 test" ) ) print( Angle() )
Output:
1.00 2.00 3.00 4.00 5.00 6.00 7.00 8.00 9.00 0.00 0.00 0.00 0.00 0.00 0.00

Page Links


Special Pages


Wikis

?

Render Time: 51ms

Session 0
DB GetPage 6
Generate Html 19
SaveChanges 12
Render Body 0
Render Sidebar 11