diff options
author | Thiago Macieira <thiago.macieira@intel.com> | 2012-08-31 11:53:34 +0200 |
---|---|---|
committer | Qt by Nokia <qt-info@nokia.com> | 2012-08-31 16:10:25 +0200 |
commit | 9aa67cf0c48ff8e9e73fc19c4dcd950961b5ad54 (patch) | |
tree | 767616f33dcb191df4e9a7688457e836a11c8c1b /src/corelib/kernel/qmath.h | |
parent | 0a0157f5459ba61b5978fea90cad486757da3590 (diff) |
Fix the name of the arguments of qAtan2 to match std::atan2
There is no change in functionality, just swapping of the names x and y.
The std::atan2 function uses (y, x) in that order, so we should too.
Task-number: QTBUG-27090
Change-Id: I7d4597a6c6909f574c517033f5d49fe17b7a7ead
Reviewed-by: Oswald Buddenhagen <oswald.buddenhagen@nokia.com>
Diffstat (limited to 'src/corelib/kernel/qmath.h')
-rw-r--r-- | src/corelib/kernel/qmath.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h index 309564b0f8..f5aca27c38 100644 --- a/src/corelib/kernel/qmath.h +++ b/src/corelib/kernel/qmath.h @@ -145,14 +145,14 @@ inline qreal qAtan(qreal v) return atan(v); } -inline qreal qAtan2(qreal x, qreal y) +inline qreal qAtan2(qreal y, qreal x) { #ifdef QT_USE_MATH_H_FLOATS if (sizeof(qreal) == sizeof(float)) - return atan2f(float(x), float(y)); + return atan2f(float(y), float(x)); else #endif - return atan2(x, y); + return atan2(y, x); } inline qreal qSqrt(qreal v) |