summaryrefslogtreecommitdiffstats
path: root/src/gui/math3d/qquaternion.cpp
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2012-11-26 14:26:46 +0000
committerThe Qt Project <gerrit-noreply@qt-project.org>2012-11-26 17:33:37 +0100
commitd6c38bf60a0c17cfc1ab854f73e707e6e2f8ff26 (patch)
treea046efbb7565c3f434955b429c63d7d8c0eb1e8f /src/gui/math3d/qquaternion.cpp
parent5a0fd7fb04af6e9e6d16e9647756ee05441fc245 (diff)
Remove last usages of qSin and friends from QQuaternion
Change-Id: I93fe1d22313da4cfa671603ccdbe9ac8f02cd73b Reviewed-by: Lars Knoll <lars.knoll@digia.com>
Diffstat (limited to 'src/gui/math3d/qquaternion.cpp')
-rw-r--r--src/gui/math3d/qquaternion.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/gui/math3d/qquaternion.cpp b/src/gui/math3d/qquaternion.cpp
index 9d45b32069..3f39fa43c3 100644
--- a/src/gui/math3d/qquaternion.cpp
+++ b/src/gui/math3d/qquaternion.cpp
@@ -382,8 +382,8 @@ QQuaternion QQuaternion::fromAxisAndAngle
z /= length;
}
float a = (angle / 2.0f) * M_PI / 180.0f;
- float s = qSin(a);
- float c = qCos(a);
+ float s = sinf(a);
+ float c = cosf(a);
return QQuaternion(c, x * s, y * s, z * s).normalized();
}
@@ -519,11 +519,11 @@ QQuaternion QQuaternion::slerp
float factor1 = 1.0f - t;
float factor2 = t;
if ((1.0f - dot) > 0.0000001) {
- float angle = float(qAcos(dot));
- float sinOfAngle = float(qSin(angle));
+ float angle = acosf(dot);
+ float sinOfAngle = sinf(angle);
if (sinOfAngle > 0.0000001) {
- factor1 = float(qSin((1.0f - t) * angle)) / sinOfAngle;
- factor2 = float(qSin(t * angle)) / sinOfAngle;
+ factor1 = sinf((1.0f - t) * angle) / sinOfAngle;
+ factor2 = sinf(t * angle) / sinOfAngle;
}
}