From 0a2833996344dee71caf8ff070dd2390c9f0a1bf Mon Sep 17 00:00:00 2001 From: Roman Telezhynskyi Date: Mon, 26 Aug 2019 09:15:46 +0300 Subject: [PATCH] Fix inverse trigonometric functions. Wrong work with degrees. (grafted from 91c06257daf0d9172d41348dac216027d9f0a855) --HG-- branch : develop --- ChangeLog.txt | 1 + src/libs/qmuparser/qmuparser.cpp | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/ChangeLog.txt b/ChangeLog.txt index 2f8e751eb..87118b0f3 100644 --- a/ChangeLog.txt +++ b/ChangeLog.txt @@ -62,6 +62,7 @@ - Changing settings for move and rotate tools through property browser does not take in count previous change for label point and Show label option. - Fix locking file after double save as. - Key --ignoremargins still required margins. +- Fix inverse trigonometric functions. Wrong work with degrees. # Version 0.6.1 October 23, 2018 - [#885] Regression. Broken support for multi size measurements. diff --git a/src/libs/qmuparser/qmuparser.cpp b/src/libs/qmuparser/qmuparser.cpp index a675e274e..40c23523c 100644 --- a/src/libs/qmuparser/qmuparser.cpp +++ b/src/libs/qmuparser/qmuparser.cpp @@ -184,7 +184,7 @@ qreal QmuParser::SinD(qreal v) //--------------------------------------------------------------------------------------------------------------------- qreal QmuParser::ASinD(qreal v) { - return qRadiansToDegrees(qAsin(v)); + return qAsin(qDegreesToRadians(v)); } //--------------------------------------------------------------------------------------------------------------------- @@ -196,7 +196,7 @@ qreal QmuParser::CosD(qreal v) //--------------------------------------------------------------------------------------------------------------------- qreal QmuParser::ACosD(qreal v) { - return qRadiansToDegrees(qAcos(v)); + return qAcos(qDegreesToRadians(v)); } //--------------------------------------------------------------------------------------------------------------------- @@ -208,7 +208,7 @@ qreal QmuParser::TanD(qreal v) //--------------------------------------------------------------------------------------------------------------------- qreal QmuParser::ATanD(qreal v) { - return qRadiansToDegrees(qAtan(v)); + return qAtan(qDegreesToRadians(v)); } //---------------------------------------------------------------------------------------------------------------------