Garry's Mod Wiki

Revision Difference

math.ApproachAngle#511568

<function name="ApproachAngle" parent="math" type="libraryfunc">⤶ <description>⤶ Increments an angle towards another by specified rate.⤶ ⤶ <note>This function is for numbers representing angles (0-360), NOT <page>Angle</page> objects!</note>⤶ </description>⤶ <realm>Shared and Menu</realm>⤶ <file line="209-L215">lua/includes/extensions/math.lua</file>⤶ <args>⤶ <arg name="currentAngle" type="number">The current angle to increase</arg>⤶ <arg name="targetAngle" type="number">The angle to increase towards</arg>⤶ <arg name="rate" type="number">The amount to approach the target angle by</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="number">Modified angle</ret>⤶ </rets>⤶ </function>⤶ ⤶