No, trigonometric functions in the standard C library work in radians. But you can easily get away with a macro or a built-in function:
#define sind(x) (sin((x) * M_PI / 180))
or
inline double sind(double x) { return sin(x * M_PI / 180); }
Note that the opposite conversion is necessary if you want to change the return value of the function (the so-called inverse or "arc" functions):
inline double asind(double x) { return asin(x) / M_PI * 180; }
user529758
source share