summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-08 17:02:23 +0200
committerVolker Hilsheimer <volker.hilsheimer@nokia.com>2009-07-08 17:06:29 +0200
commitb358143b7eb5dc3d76a09e501914fa00d0c3876c (patch)
tree667cbc611126753d90ef533853dfe0e4ac3abfe4 /src
parentcf7ca87e057ef3810c5db36ff975a98f532a8dc0 (diff)
Define M_PI in qmath.h if not defined by math.h (as is the case on Windows), and remove duplicate defines elsewhere.
Diffstat (limited to 'src')
-rw-r--r--src/corelib/kernel/qmath.h4
-rw-r--r--src/gui/math3d/qmatrix4x4.cpp4
-rw-r--r--src/gui/math3d/qquaternion.cpp4
3 files changed, 4 insertions, 8 deletions
diff --git a/src/corelib/kernel/qmath.h b/src/corelib/kernel/qmath.h
index 348957f957..7a77d566c1 100644
--- a/src/corelib/kernel/qmath.h
+++ b/src/corelib/kernel/qmath.h
@@ -132,6 +132,10 @@ inline qreal qPow(qreal x, qreal y)
return pow(x, y);
}
+#ifndef M_PI
+#define M_PI (3.14159265358979323846)
+#endif
+
QT_END_NAMESPACE
QT_END_HEADER
diff --git a/src/gui/math3d/qmatrix4x4.cpp b/src/gui/math3d/qmatrix4x4.cpp
index 9fe487b02e..b99835375e 100644
--- a/src/gui/math3d/qmatrix4x4.cpp
+++ b/src/gui/math3d/qmatrix4x4.cpp
@@ -1004,10 +1004,6 @@ QMatrix4x4& QMatrix4x4::rotate(qreal angle, const QVector3D& vector)
#endif
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
/*!
\overload
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 17c4373acb..9988e2b470 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -339,10 +339,6 @@ QVector3D QQuaternion::rotateVector(const QVector3D& vector) const
\sa operator*=()
*/
-#ifndef M_PI
-#define M_PI 3.14159265358979323846
-#endif
-
#ifndef QT_NO_VECTOR3D
/*!