1
0
mirror of https://github.com/alliedmodders/hl2sdk.git synced 2025-09-20 20:46:03 +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:30:37 -05:00
parent 6c38e2e589
commit 4caefcbcba
300 changed files with 1041 additions and 1084 deletions

View File

@ -1667,7 +1667,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 );
@ -3938,10 +3938,10 @@ void CalcTriangleTangentSpace( const Vector &p0, const Vector &p1, const Vector
//-----------------------------------------------------------------------------
void RGBtoHSV( const Vector &rgb, Vector &hsv )
{
float flMax = max( rgb.x, rgb.y );
flMax = max( flMax, rgb.z );
float flMin = min( rgb.x, rgb.y );
flMin = min( flMin, rgb.z );
float flMax = MAX( rgb.x, rgb.y );
flMax = MAX( flMax, rgb.z );
float flMin = MIN( rgb.x, rgb.y );
flMin = MIN( flMin, rgb.z );
// hsv.z is the value
hsv.z = flMax;