diff options
author | Sean Harmer <sean.harmer@kdab.com> | 2013-08-16 17:57:38 +0200 |
---|---|---|
committer | The Qt Project <gerrit-noreply@qt-project.org> | 2013-08-27 17:50:40 +0200 |
commit | a70c0ad1d15e1346f7784f4e720bbe460af85c17 (patch) | |
tree | a5c2e1c59a2d2c1977d1cd922f15ccdfcb46696a /src/gui/math3d/qvector4d.cpp | |
parent | e0f2603f49b17eb4e562ec81e92796e3b2435490 (diff) |
Add operator[] to QVectorND classes
Change-Id: Ia786d4fab64da974bb60f24c05325925d42a1e70
Reviewed-by: Gunnar Sletta <gunnar.sletta@digia.com>
Reviewed-by: Giuseppe D'Angelo <giuseppe.dangelo@kdab.com>
Diffstat (limited to 'src/gui/math3d/qvector4d.cpp')
-rw-r--r-- | src/gui/math3d/qvector4d.cpp | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp index 7ced99dfeb..2247e95d5e 100644 --- a/src/gui/math3d/qvector4d.cpp +++ b/src/gui/math3d/qvector4d.cpp @@ -225,6 +225,25 @@ QVector4D::QVector4D(const QVector3D& vector, float wpos) \sa w(), setX(), setY(), setZ() */ +/*! \fn float &QVector4D::operator[](int i) + \since 5.2 + + Returns the component of the vector at index position \a i + as a modifiable reference. + + \a i must be a valid index position in the vector (i.e., 0 <= \a i + < 4). +*/ + +/*! \fn float QVector4D::operator[](int i) const + \since 5.2 + + Returns the component of the vector at index position \a i. + + \a i must be a valid index position in the vector (i.e., 0 <= \a i + < 4). +*/ + /*! Returns the length of the vector from the origin. |