[Solved] Wrong cosine? Why?
GiovaBici last edited by ccc
Hello everybody. I would need to calculate the cosine of an angle. I used the math.cos () function, but the result I am getting is wrong. can anyone tell me why? thank you.
I am attaching the text:
import math print(math.cos(60))
in the console, as a result, is:
Otherwise, can you tell me another method with which to calculate the cosine?
ccc last edited by ccc
RTFM... https://docs.python.org/3/library/math.html#math.cos Return the cosine of x radians.
cvp last edited by
returns its results in radians
The angle has to be given in radians but cos returns a number between -1 and +1
GiovaBici last edited by
thank you so much. I had foolishly forgotten ...