Reputation: 31
I import "math.h".
I can use the cos function,
but when I execute cos(0.321139585333178)
the result is 0.948876
If I use the calculator in Mac or use a normal calculator, the result is 0.999984292347418
Can anyone help me to solve that problem?
Upvotes: 3
Views: 382
Reputation: 837946
You're confusing degrees with radians.
cos(0.321139585333178 degrees) = 0.999984292
cos(0.321139585333178 radians) = 0.948876326
Upvotes: 19