Garry's Mod Wiki

math.cos

  number math.cos( number number )

Description

Returns the cosine of given angle.

Arguments

1 number number
Angle in radians

Returns

1 number
Cosine of given angle

Example

Prints the cosine of 3.14159265 (Pi)

print( math.cos( 3.14159265 ) )
Output: -1