Garry's Mod Wiki

Revision Difference

math.cos#511583

<function name="cos" parent="math" type="libraryfunc">⤶ <description>Returns the of given angle.</description>⤶ <realm>Shared and Menu</realm>⤶ <args>⤶ <arg name="number" type="number">Angle in radians</arg>⤶ </args>⤶ <rets>⤶ <ret name="" type="number">Cosine of given angle</ret>⤶ </rets>⤶ </function>⤶ ⤶ <example>⤶ <description>Prints the cosine of 3.14159265 (Pi)</description>⤶ <code>print( math.cos( 3.14159265 ) )</code>⤶ <output>-1</output>⤶ ⤶ </example>