summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSean Harmer <sean.harmer@kdab.com>2017-09-10 11:27:50 +0100
committerSean Harmer <sean.harmer@kdab.com>2017-10-03 10:37:58 +0000
commit733afa3b259f78b81145ed2d1a8b8cc54184c4aa (patch)
tree5995b0435a64f36af71abc0c93ff724f3640a428
parent93866c8a742d5b6c1c612c17b71f2e5e57fe6b74 (diff)
Use qFuzzyCompare for rotation angles
Fixes clang warning. Change-Id: I1831bd112c33cdd1fe9cc7ae169cfba05cb8a694 Reviewed-by: Paul Lemire <paul.lemire@kdab.com>
-rw-r--r--tests/manual/bigscene-cpp/entity.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/manual/bigscene-cpp/entity.cpp b/tests/manual/bigscene-cpp/entity.cpp
index a4625a9b2..c3786275e 100644
--- a/tests/manual/bigscene-cpp/entity.cpp
+++ b/tests/manual/bigscene-cpp/entity.cpp
@@ -102,7 +102,7 @@ QColor Entity::diffuseColor() const
void Entity::setTheta(float theta)
{
- if (m_theta == theta)
+ if (qFuzzyCompare(m_theta, theta))
return;
m_theta = theta;
@@ -114,7 +114,7 @@ void Entity::setTheta(float theta)
void Entity::setPhi(float phi)
{
- if (m_phi == phi)
+ if (qFuzzyCompare(m_phi, phi))
return;
m_phi = phi;