Hi there, I have a function in my objective c project that plays with sine and cosine... basically:
The problem is that by default, xcode (or objective c, im not entirely sure which) uses Radians to graph a cosine wave. But I want my answer to come back in degrees. I know all about how to mathematically convert a radian to a degree and vice versa. But for the purpose of actually graphing something, I would love to actually create a cosine wave in degrees. Any ideas?
Code:
float y;
float x;
x = 85.09 //any number really
y = cos(x);
The problem is that by default, xcode (or objective c, im not entirely sure which) uses Radians to graph a cosine wave. But I want my answer to come back in degrees. I know all about how to mathematically convert a radian to a degree and vice versa. But for the purpose of actually graphing something, I would love to actually create a cosine wave in degrees. Any ideas?