From bbd20eb70b9c31530efe48715a3a3af381c6d49f Mon Sep 17 00:00:00 2001 From: Michael Kuron <mkuron@icp.uni-stuttgart.de> Date: Wed, 19 Jul 2017 12:05:43 +0200 Subject: [PATCH] Silence conversion warning in quaternion --- src/core/math/Quaternion.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/math/Quaternion.h b/src/core/math/Quaternion.h index 098c8325b..2c128b4d1 100644 --- a/src/core/math/Quaternion.h +++ b/src/core/math/Quaternion.h @@ -518,7 +518,7 @@ inline Quaternion<Type>& Quaternion<Type>::normalize() { const Type len( std::sqrt( v_[0]*v_[0] + v_[1]*v_[1] + v_[2]*v_[2] + v_[3]*v_[3] ) ); - if( len == Type(0) ) + if( isIdentical(len, Type(0)) ) return *this; const Type ilen( Type(1)/len ); @@ -543,7 +543,7 @@ inline const Quaternion<Type> Quaternion<Type>::getNormalized() const { const Type len( std::sqrt( v_[0]*v_[0] + v_[1]*v_[1] + v_[2]*v_[2] + v_[3]*v_[3] ) ); - if( len == Type(0) ) + if( isIdentical(len, Type(0)) ) return *this; const Type ilen( Type(1)/len ); -- GitLab