Also, trigonometric functions from math.h such as sin(), cos() and tan() all take their argument expressed in radians. You may know this already but it's hard to tell from your code.

To convert...