diff options
author | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-12-15 12:50:01 (GMT) |
---|---|---|
committer | Aleksandar Sasha Babic <aleksandar.babic@nokia.com> | 2009-12-15 12:53:52 (GMT) |
commit | 4391014d4533e60dc4e5e413db50b21f68f4658c (patch) | |
tree | f82a40ea71e58ed44cb199daffe8305e7988b379 /src/gui/widgets/qdial.cpp | |
parent | 100ad353689b8203988c87afe30953d59bdad736 (diff) | |
download | Qt-4391014d4533e60dc4e5e413db50b21f68f4658c.zip Qt-4391014d4533e60dc4e5e413db50b21f68f4658c.tar.gz Qt-4391014d4533e60dc4e5e413db50b21f68f4658c.tar.bz2 |
qreal-ization
Using math wrapper functions instead direct call. This gives us top-level
control to what (single/double) precision we are effectively using.
Task-number: QTBUG-4894
Reviewed-by: janarve
Reviewed-by: Kim Motoyoshi Kalland
Diffstat (limited to 'src/gui/widgets/qdial.cpp')
-rw-r--r-- | src/gui/widgets/qdial.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/gui/widgets/qdial.cpp b/src/gui/widgets/qdial.cpp index 95e6ed5..dc02c02 100644 --- a/src/gui/widgets/qdial.cpp +++ b/src/gui/widgets/qdial.cpp @@ -59,6 +59,7 @@ #ifndef QT_NO_ACCESSIBILITY #include "qaccessible.h" #endif +#include <qmath.h> QT_BEGIN_NAMESPACE @@ -135,7 +136,7 @@ int QDialPrivate::valueFromPoint(const QPoint &p) const Q_Q(const QDial); double yy = (double)q->height()/2.0 - p.y(); double xx = (double)p.x() - q->width()/2.0; - double a = (xx || yy) ? atan2(yy, xx) : 0; + double a = (xx || yy) ? qAtan2(yy, xx) : 0; if (a < Q_PI / -2) a = a + Q_PI * 2; |