Skip to content
Snippets Groups Projects
Commit bbd20eb7 authored by Michael Kuron's avatar Michael Kuron :mortar_board:
Browse files

Silence conversion warning in quaternion

parent 579b6bbe
Branches
Tags
No related merge requests found
...@@ -518,7 +518,7 @@ inline Quaternion<Type>& Quaternion<Type>::normalize() ...@@ -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] ) ); 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; return *this;
const Type ilen( Type(1)/len ); const Type ilen( Type(1)/len );
...@@ -543,7 +543,7 @@ inline const Quaternion<Type> Quaternion<Type>::getNormalized() const ...@@ -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] ) ); 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; return *this;
const Type ilen( Type(1)/len ); const Type ilen( Type(1)/len );
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment