src/gui/math3d/qquaternion.cpp
changeset 3 41300fa6a67c
parent 0 1918ee327afb
child 4 3b1da2848fc7
equal deleted inserted replaced
2:56cd8111b7f7 3:41300fa6a67c
   286 /*!
   286 /*!
   287     Rotates \a vector with this quaternion to produce a new vector
   287     Rotates \a vector with this quaternion to produce a new vector
   288     in 3D space.  The following code:
   288     in 3D space.  The following code:
   289 
   289 
   290     \code
   290     \code
   291     QVector3D result = q.rotateVector(vector);
   291     QVector3D result = q.rotatedVector(vector);
   292     \endcode
   292     \endcode
   293 
   293 
   294     is equivalent to the following:
   294     is equivalent to the following:
   295 
   295 
   296     \code
   296     \code
   297     QVector3D result = (q * QQuaternion(0, vector) * q.conjugate()).vector();
   297     QVector3D result = (q * QQuaternion(0, vector) * q.conjugate()).vector();
   298     \endcode
   298     \endcode
   299 */
   299 */
   300 QVector3D QQuaternion::rotateVector(const QVector3D& vector) const
   300 QVector3D QQuaternion::rotatedVector(const QVector3D& vector) const
   301 {
   301 {
   302     return (*this * QQuaternion(0, vector) * conjugate()).vector();
   302     return (*this * QQuaternion(0, vector) * conjugate()).vector();
   303 }
   303 }
   304 
   304 
   305 /*!
   305 /*!