1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-19 20:16:10 +08:00

Fixed conflict between min/max macros and std::min/max when using GCC >= 4.2.

This commit is contained in:
Scott Ehlert
2011-04-28 01:29:22 -05:00
parent 88dd2ac536
commit 7f4855ae1f
265 changed files with 904 additions and 945 deletions

View File

@ -572,8 +572,8 @@ float _SSE_InvRSquared(const float* v)
shufps xmm2, xmm2, 1 // x2 = vy * vy, X, X, X
addss xmm1, xmm2 // x1 = (vx * vx) + (vy * vy), X, X, X
addss xmm1, xmm3 // x1 = (vx * vx) + (vy * vy) + (vz * vz), X, X, X
maxss xmm1, xmm5 // x1 = max( 1.0, x1 )
rcpss xmm0, xmm1 // x0 = 1 / max( 1.0, x1 )
maxss xmm1, xmm5 // x1 = MAX( 1.0, x1 )
rcpss xmm0, xmm1 // x0 = 1 / MAX( 1.0, x1 )
movss inv_r2, xmm0 // inv_r2 = x0
}
#elif _LINUX
@ -3678,7 +3678,7 @@ void QuaternionScale( const Quaternion &p, float t, Quaternion &q )
// FIXME: nick, this isn't overly sensitive to accuracy, and it may be faster to
// use the cos part (w) of the quaternion (sin(omega)*N,cos(omega)) to figure the new scale.
float sinom = sqrt( DotProduct( &p.x, &p.x ) );
sinom = min( sinom, 1.f );
sinom = MIN( sinom, 1.f );
float sinsom = sin( asin( sinom ) * t );