Browse Source

We need to translate from degree to rad

pre-master-46
Holger Vogt 3 years ago
parent
commit
3632a6b4ae
  1. 4
      src/maths/cmaths/cmath1.c

4
src/maths/cmaths/cmath1.c

@ -875,10 +875,10 @@ cx_atanh(void* data, short int type, int length, int* newlength, short int* newt
int i; int i;
for (i = 0; i < length; i++) { for (i = 0; i < length; i++) {
#ifdef _MSC_VER #ifdef _MSC_VER
_Dcomplex midin = _Cbuild(cc[i].cx_real, cc[i].cx_imag);
_Dcomplex midin = _Cbuild(degtorad(realpart(cc[i])), degtorad(imagpart(cc[i])));
_Dcomplex midout = catanh(midin); _Dcomplex midout = catanh(midin);
#else #else
double complex midin = cc[i].cx_real + _Complex_I * cc[i].cx_imag;
double complex midin = degtorad(realpart(cc[i])) + _Complex_I * degtorad(imagpart(cc[i]));
double complex midout = catanh(midin); double complex midout = catanh(midin);
#endif #endif
d[i].cx_real = creal(midout); d[i].cx_real = creal(midout);

Loading…
Cancel
Save