diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-26 13:53:00 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-26 20:31:20 +0000 |
commit | 3f858a07726666222372f793f1e1a5de3c8ec373 (patch) | |
tree | 99b8f41136575040587a6ebd3ff54211320cb214 /src/gui/painting/qbezier.cpp | |
parent | 4ed795df247c5859089e3a6b6ca7c24e8c973a31 (diff) |
Remove some uses of the private Q_PI constant
The patch removes several uses of the private Q_PI constant and removes
the qmath_p.h from the includes. A few places are optimized to multiply
with reciprocals instead of dividing by Q_PI.
Change-Id: I097af6a929e0609d6935563064e81c856005f4bc
Reviewed-by: Marc Mutz <marc.mutz@kdab.com>
Diffstat (limited to 'src/gui/painting/qbezier.cpp')
-rw-r--r-- | src/gui/painting/qbezier.cpp | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/src/gui/painting/qbezier.cpp b/src/gui/painting/qbezier.cpp index fac5f4de3c..e5c9e8d773 100644 --- a/src/gui/painting/qbezier.cpp +++ b/src/gui/painting/qbezier.cpp @@ -40,7 +40,6 @@ #include <qmath.h> #include <private/qnumeric_p.h> -#include <private/qmath_p.h> QT_BEGIN_NAMESPACE @@ -363,7 +362,7 @@ static bool addCircle(const QBezier *b, qreal offset, QBezier *o) cos_a = 1.; if (cos_a < -1.) cos_a = -1; - angles[i] = qAcos(cos_a)/Q_PI; + angles[i] = qAcos(cos_a) * qreal(M_1_PI); } if (angles[0] + angles[1] > 1.) { |