kfrlib / kfr

Fast, modern C++ DSP framework, FFT, Sample Rate Conversion, FIR/IIR/Biquad Filters (SSE, AVX, AVX-512, ARM NEON)
https://www.kfrlib.com
GNU General Public License v2.0
1.65k stars 253 forks source link

carg error? #107

Closed mipac closed 3 years ago

mipac commented 3 years ago

I have kfr::carg(kfr::complex(1,0)) == pi/2 and kfr::carg(kfr::complex(0,1)) == 0

in the code there is : return atan2(even(xx), odd(xx)); but shouldn't it be return atan2(odd(xx), even(xx));

ie atan2(imag, real)

regards

samuelriddle commented 3 years ago

Thank you for reporting. It will be fixed in the next patch release.

dancazarin commented 3 years ago

Hi,

The issue has been fixed in master branch.