sc/source/core/tool/interpr3.cxx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-)
New commits: commit fd7f542c1342bdcab35c5186b629d57467bf832c Author: Dennis Francis <dennis.fran...@collabora.com> AuthorDate: Tue Feb 19 18:37:37 2019 +0530 Commit: Dennis Francis <dennis.fran...@collabora.com> CommitDate: Wed Feb 20 07:15:05 2019 +0100 tdf#74664 : Compute the phase correctly using atan2 atan2() should be used to compute the phase angle as atan() does not know which quadrant the input point is in. Change-Id: I9d659ae32768d3787af9d0de62c9b28c1a0f5688 Reviewed-on: https://gerrit.libreoffice.org/68016 Tested-by: Jenkins Reviewed-by: Dennis Francis <dennis.fran...@collabora.com> diff --git a/sc/source/core/tool/interpr3.cxx b/sc/source/core/tool/interpr3.cxx index e568e4f96367..243332668344 100644 --- a/sc/source/core/tool/interpr3.cxx +++ b/sc/source/core/tool/interpr3.cxx @@ -4908,7 +4908,7 @@ void ScFFT2::convertToPolar() { fR = getReal(nIdx); fI = getImag(nIdx); - fPhase = atan(fI/fR); + fPhase = atan2(fI, fR); fMag = sqrt(fR*fR + fI*fI); setReal(fMag, nIdx); _______________________________________________ Libreoffice-commits mailing list libreoffice-comm...@lists.freedesktop.org https://lists.freedesktop.org/mailman/listinfo/libreoffice-commits