summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qvector4d.cpp
diff options
context:
space:
mode:
authorRhys Weatherley <rhys.weatherley@nokia.com>2009-04-08 00:46:23 (GMT)
committerRhys Weatherley <rhys.weatherley@nokia.com>2009-04-08 00:46:23 (GMT)
commit6fd4a720870775a4d9a645d9000b0259caa74178 (patch)
tree84c2f5d439a9d53d8633545eb7432a4ca91fa4ef /src/gui/math3d/qvector4d.cpp
parentf63976b7c5fd512c00442efd5cb9afb0b3707388 (diff)
parenta83faaf1bedfd321c4fc759156369d2f86fbbbed (diff)
downloadQt-6fd4a720870775a4d9a645d9000b0259caa74178.zip
Qt-6fd4a720870775a4d9a645d9000b0259caa74178.tar.gz
Qt-6fd4a720870775a4d9a645d9000b0259caa74178.tar.bz2
Merge branch 'no-math3d-fixed'
Diffstat (limited to 'src/gui/math3d/qvector4d.cpp')
-rw-r--r--src/gui/math3d/qvector4d.cpp12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/gui/math3d/qvector4d.cpp b/src/gui/math3d/qvector4d.cpp
index 4287806..d19665a 100644
--- a/src/gui/math3d/qvector4d.cpp
+++ b/src/gui/math3d/qvector4d.cpp
@@ -42,7 +42,8 @@
#include "qvector4d.h"
#include "qvector3d.h"
#include "qvector2d.h"
-#include "qmath3dutil_p.h"
+#include <QtCore/qdebug.h>
+#include <QtCore/qmath.h>
QT_BEGIN_NAMESPACE
@@ -237,8 +238,7 @@ QVector4D::QVector4D(const QVector3D& vector, qreal wpos)
*/
qreal QVector4D::length() const
{
- return qvtsqrt64(qvtmul64(xp, xp) + qvtmul64(yp, yp) +
- qvtmul64(zp, zp) + qvtmul64(wp, wp));
+ return qSqrt(xp * xp + yp * yp + zp * zp + wp * wp);
}
/*!
@@ -249,8 +249,7 @@ qreal QVector4D::length() const
*/
qreal QVector4D::lengthSquared() const
{
- return qvtdot64(qvtmul64(xp, xp) + qvtmul64(yp, yp) +
- qvtmul64(zp, zp) + qvtmul64(wp, wp));
+ return xp * xp + yp * yp + zp * zp + wp * wp;
}
/*!
@@ -336,8 +335,7 @@ void QVector4D::normalize()
*/
qreal QVector4D::dotProduct(const QVector4D& v1, const QVector4D& v2)
{
- return qvtdot64(qvtmul64(v1.xp, v2.xp) + qvtmul64(v1.yp, v2.yp) +
- qvtmul64(v1.zp, v2.zp) + qvtmul64(v1.wp, v2.wp));
+ return v1.xp * v2.xp + v1.yp * v2.yp + v1.zp * v2.zp + v1.wp * v2.wp;
}
/*!