diff options
author | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-07 14:50:23 (GMT) |
---|---|---|
committer | Bjoern Erik Nilsen <bjorn.nilsen@nokia.com> | 2009-04-08 08:24:38 (GMT) |
commit | 72f84ad17d0905f91e9d3988bb0f6482df6c6c78 (patch) | |
tree | fa1c345ee0d052db81733659f9fcdc161ede0b95 /src/gui/painting/qpaintengine_d3d.cpp | |
parent | 6fd4a720870775a4d9a645d9000b0259caa74178 (diff) | |
download | Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.zip Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.gz Qt-72f84ad17d0905f91e9d3988bb0f6482df6c6c78.tar.bz2 |
Use qIsFuzzyNull rather than the more expensive qFuzzyCompare
See also fde7f3d03782c801901f511131458d6fcb1021a5
Reviewed-by: Olivier
Reviewed-by: Samuel
Diffstat (limited to 'src/gui/painting/qpaintengine_d3d.cpp')
-rw-r--r-- | src/gui/painting/qpaintengine_d3d.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/gui/painting/qpaintengine_d3d.cpp b/src/gui/painting/qpaintengine_d3d.cpp index bb81623..4b494d1 100644 --- a/src/gui/painting/qpaintengine_d3d.cpp +++ b/src/gui/painting/qpaintengine_d3d.cpp @@ -2506,8 +2506,8 @@ void QD3DDrawHelper::addTrap(const Trapezoid &trap) qreal _rightA = (qreal)_w/_h; qreal _rightB = topRightX - _rightA * topRightY; - qreal invLeftA = qFuzzyCompare(_leftA + 1, 1) ? 0.0 : 1.0 / _leftA; - qreal invRightA = qFuzzyCompare(_rightA + 1, 1) ? 0.0 : 1.0 / _rightA; + qreal invLeftA = qIsFuzzyNull(_leftA) ? 0.0 : 1.0 / _leftA; + qreal invRightA = qIsFuzzyNull(_rightA) ? 0.0 : 1.0 / _rightA; vertex v1 = { {1.f, top - 1.f, 0.5f}, 0.f, top, bottom, invLeftA, -invRightA, @@ -2970,7 +2970,7 @@ qreal calculateAngle(qreal dx, qreal dy) { qreal angle; - if (qFuzzyCompare(dx + 1, 1)) { + if (qIsFuzzyNull(dx)) { angle = (dy < 0) ? -M_PI/2 : M_PI/2; } else { angle = atanf(dy/dx); |