Vector/AngleEx

From Garry's Mod
Jump to: navigation, search
 Vector:AngleEx( )

Contents

Description

Returns the angle of the vector, but instead of assuming that up is Vector( 0, 0, 1 ) (Like Vector:Angle does) you can specify which direction is 'up' for the angle.

Arguments

Vector up

The up direction vector

Returns

Angle

The angle

Examples

Example

Shows usage of the function

print( Vector( 0, 0, 100 ):AngleEx( Vector( 0, 0, 0 ) ) )

Output:

Angle( -90.000, -0.000, 0.000 )
Personal tools
Navigation