为什么我得到错误的虚数?

Why am I getting wrong imaginary number?

我想通过将它们转换为 C 中的笛卡尔值来收集极坐标值。

但我在 12°:

得到了错误的值
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
#include <complex.h>

int main()
{   
    int desire=1;
    int wind[desire];
    for (int i = 0; i < desire; i++)
    {
        printf("\nEnter degree of wind:");
        scanf("%d",&wind[i]);
    }
    
    double complex sum=0;

    for (int i = 0; i < desire; i++)
    {
        sum=cos(wind[i])+ sin(wind[i]) * I;
    }

    double convert(double radian); 

    printf("\n %.2f %.2fi",creal(sum),cimag(sum));
    double r =hypot(creal(sum),cimag(sum));
    double angle= convert(atanf(creal(sum)/cimag(sum))) ;

    printf("\n %.2f %.2f",r,angle);

    return 0;
} 

返回完全错误的正弦值(虚数)

0.84 -0.54i
1.00 -57.55

它应该打印0.97 +0.20i而不是0.84 -0.54i
我做错了什么?

convert函数:

#include <math.h>
#include "convert.h"
double convert(double radian)
{
    return(radian * (180/M_PI));
}

Per 7.12.4.6 The sin functions(加粗我的):

The sin functions compute the sine of x (measured in radians).

cos()相似

您正在输入 12 弧度