Python cos function
Python cos(x)
function returns the cosine value of x.
The principle values for x is [-∞,∞]. It's a method of math
module.
>>> import math >>> math.cos(math.pi)
-1.0
>>> math.cos(0)
1
>>> math.cos(3 * math.pi/4)
-0.7071067811865475
>>> math.cos(math.pi/3)
-0.5000000000000001
|
|||||||||||||||||||||||||||||||
|