diff --git a/src/core/math/Quaternion.h b/src/core/math/Quaternion.h index 098c8325bc970a53df3b24eb29776a3916a0605f..2c128b4d1c118a277125339813533bcc4c04e3cd 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 );