summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorSarah Smith <sarah.j.smith@nokia.com>2011-02-16 04:58:28 (GMT)
committerSarah Smith <sarah.j.smith@nokia.com>2011-02-16 04:58:28 (GMT)
commitb5076fb392894e71b44b4762d0567354ef1c8a9e (patch)
treefb626b9b1df8814a88b7642d4eb8fd6dbada5ecc /src
parent0b0358732cafc34d4b6794200752ac9cb99de569 (diff)
downloadQt-b5076fb392894e71b44b4762d0567354ef1c8a9e.zip
Qt-b5076fb392894e71b44b4762d0567354ef1c8a9e.tar.gz
Qt-b5076fb392894e71b44b4762d0567354ef1c8a9e.tar.bz2
Add a "note well" to QVectorXD re float precision.
Several bug-reports ask for clarifications/warnings in the doc for this class, since it stores in float, but has a qreal interface (as per qt convention). Change-Id: I32ffcde3733866942134e881567eef367a5620f5 Task-number: QTBUG-8216 Reviewed-by: Rhys Weatherley
Diffstat (limited to 'src')
-rw-r--r--src/gui/math3d/qvector2d.cpp5
-rw-r--r--src/gui/math3d/qvector3d.cpp5
-rw-r--r--src/gui/math3d/qvector4d.cpp5
3 files changed, 15 insertions, 0 deletions
diff --git a/src/gui/math3d/qvector2d.cpp b/src/gui/math3d/qvector2d.cpp
index 7f5a937..1fccfc9 100644
--- a/src/gui/math3d/qvector2d.cpp
+++ b/src/gui/math3d/qvector2d.cpp
@@ -60,6 +60,11 @@ QT_BEGIN_NAMESPACE
The QVector2D class can also be used to represent vertices in 2D space.
We therefore do not need to provide a separate vertex class.
+ \bold{Note:} By design values in the QVector2D instance are stored as \c float.
+ This means that on platforms where the \c qreal arguments to QVector2D
+ functions are represented by \c double values, it is possible to
+ lose precision.
+
\sa QVector3D, QVector4D, QQuaternion
*/
diff --git a/src/gui/math3d/qvector3d.cpp b/src/gui/math3d/qvector3d.cpp
index 2414b5f..7bf0400 100644
--- a/src/gui/math3d/qvector3d.cpp
+++ b/src/gui/math3d/qvector3d.cpp
@@ -63,6 +63,11 @@ QT_BEGIN_NAMESPACE
The QVector3D class can also be used to represent vertices in 3D space.
We therefore do not need to provide a separate vertex class.
+ \bold{Note:} By design values in the QVector3D instance are stored as \c float.
+ This means that on platforms where the \c qreal arguments to QVector3D
+ functions are represented by \c double values, it is possible to
+ lose precision.
+
\sa QVector2D, QVector4D, QQuaternion
*/
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index 74dedc4..23befc0 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -59,6 +59,11 @@ QT_BEGIN_NAMESPACE
The QVector4D class can also be used to represent vertices in 4D space.
We therefore do not need to provide a separate vertex class.
+ \bold{Note:} By design values in the QVector4D instance are stored as \c float.
+ This means that on platforms where the \c qreal arguments to QVector4D
+ functions are represented by \c double values, it is possible to
+ lose precision.
+
\sa QQuaternion, QVector2D, QVector3D
*/