diff options
author | Allan Sandfeld Jensen <allan.jensen@theqtcompany.com> | 2015-02-13 12:02:19 +0100 |
---|---|---|
committer | Sean Harmer <sean.harmer@kdab.com> | 2015-02-19 10:49:03 +0000 |
commit | 373ce8878321aa561b55131bada78ad4a2ce8427 (patch) | |
tree | 0b64429ea79163f1f13b4073bbe60040047d0540 /src/quick/util/qquicksvgparser.cpp | |
parent | 6f264b755501fd322d1e357187b42120210a7ba3 (diff) |
Cleanup math function includes and usage
Use std::math on floats and doubles, and qMath on qreals, and only
include the math headers actually needed.
Change-Id: I1d511d7b1bac0050eaa947c7baee760b736858bf
Reviewed-by: Sean Harmer <sean.harmer@kdab.com>
Diffstat (limited to 'src/quick/util/qquicksvgparser.cpp')
-rw-r--r-- | src/quick/util/qquicksvgparser.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/quick/util/qquicksvgparser.cpp b/src/quick/util/qquicksvgparser.cpp index 73f7170aa1..587f4ac972 100644 --- a/src/quick/util/qquicksvgparser.cpp +++ b/src/quick/util/qquicksvgparser.cpp @@ -159,8 +159,8 @@ static void pathArcSegment(QPainterPath &path, qreal t; qreal thHalf; - sinTh = qSin(xAxisRotation * (Q_PI / 180.0)); - cosTh = qCos(xAxisRotation * (Q_PI / 180.0)); + sinTh = qSin(qDegreesToRadians(xAxisRotation)); + cosTh = qCos(qDegreesToRadians(xAxisRotation)); a00 = cosTh * rx; a01 = -sinTh * ry; @@ -202,8 +202,8 @@ void QQuickSvgParser::pathArc(QPainterPath &path, rx = qAbs(rx); ry = qAbs(ry); - sin_th = qSin(x_axis_rotation * (Q_PI / 180.0)); - cos_th = qCos(x_axis_rotation * (Q_PI / 180.0)); + sin_th = qSin(qDegreesToRadians(x_axis_rotation)); + cos_th = qCos(qDegreesToRadians(x_axis_rotation)); dx = (curx - x) / 2.0; dy = (cury - y) / 2.0; |