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:
@ -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 );
|
||||
|
||||
|
Reference in New Issue
Block a user