Garry's Mod Wiki

Revision Difference

Vector:AngleEx#512399

<function name="AngleEx" parent="Vector" type="classfunc">⤶ <description>Returns the angle of the vector, but instead of assuming that up is <page>Global.Vector</page>( 0, 0, 1 ) (Like <page>Vector:Angle</page> does) you can specify which direction is 'up' for the angle.</description>⤶ <realm>Shared</realm>⤶ <args>⤶ <arg name="up" type="Vector">The up direction vector</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="Angle">The angle</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Shows usage of the function</description>⤶ <code>print( Vector( 0, 0, 100 ):AngleEx( Vector( 0, 0, 0 ) ) )</code>⤶ <output>Angle( -90.000, -0.000, 0.000 )</output>⤶ ⤶ </example>