mirror of
https://github.com/FWGS/xash3d-fwgs
synced 2024-11-22 09:56:22 +01:00
engine, public: fix float precision issues in mathlib and monster navigation code
This commit is contained in:
parent
5bf6f814ef
commit
a2d11f670a
@ -243,7 +243,7 @@ float SV_VecToYaw( const vec3_t src )
|
||||
}
|
||||
else
|
||||
{
|
||||
yaw = (int)( atan2( src[1], src[0] ) * 180.0f / M_PI_F );
|
||||
yaw = (int)( atan2( src[1], src[0] ) * 180.0 / M_PI );
|
||||
if( yaw < 0 ) yaw += 360.0f;
|
||||
}
|
||||
return yaw;
|
||||
|
@ -34,18 +34,18 @@ GNU General Public License for more details.
|
||||
#define ROLL 2
|
||||
|
||||
#ifndef M_PI
|
||||
#define M_PI (float)3.14159265358979323846
|
||||
#define M_PI (double)3.14159265358979323846
|
||||
#endif
|
||||
|
||||
#ifndef M_PI2
|
||||
#define M_PI2 ((float)(M_PI * 2))
|
||||
#define M_PI2 ((double)(M_PI * 2))
|
||||
#endif
|
||||
|
||||
#define M_PI_F ((float)(M_PI))
|
||||
#define M_PI2_F ((float)(M_PI2))
|
||||
|
||||
#define RAD2DEG( x ) ((float)(x) * (float)(180.f / M_PI_F))
|
||||
#define DEG2RAD( x ) ((float)(x) * (float)(M_PI_F / 180.f))
|
||||
#define RAD2DEG( x ) ((double)(x) * (double)(180.0 / M_PI))
|
||||
#define DEG2RAD( x ) ((double)(x) * (double)(M_PI / 180.0))
|
||||
|
||||
#define NUMVERTEXNORMALS 162
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user