1
Fork 0
mirror of https://github.com/SapphireServer/Sapphire.git synced 2025-05-06 02:37:47 +00:00

comparing floating point with "==" or "!=" is not correct (Chara.cpp)

This commit is contained in:
kbasikhin 2019-12-30 13:59:57 +03:00
parent 4c4fff58ce
commit a98a7eccc8

View file

@ -316,7 +316,7 @@ bool Sapphire::Entity::Chara::face( const Common::FFXIVARR_POSITION3& p )
setRot( newRot ); setRot( newRot );
return oldRot != newRot; return ( fabs( oldRot - newRot ) <= std::numeric_limits< float >::epsilon() * fmax( fabs( oldRot ), fabs( newRot ) ) );
} }
/*! /*!