Updated the SDK with the latest code from the TF and HL2 branches.
This commit is contained in:
@@ -1461,7 +1461,9 @@ float Bias( float x, float biasAmt )
|
||||
{
|
||||
lastExponent = log( biasAmt ) * -1.4427f; // (-1.4427 = 1 / log(0.5))
|
||||
}
|
||||
return pow( x, lastExponent );
|
||||
float fRet = pow( x, lastExponent );
|
||||
Assert ( !IS_NAN( fRet ) );
|
||||
return fRet;
|
||||
}
|
||||
|
||||
|
||||
@@ -1477,7 +1479,9 @@ float Gain( float x, float biasAmt )
|
||||
|
||||
float SmoothCurve( float x )
|
||||
{
|
||||
return (1 - cos( x * M_PI )) * 0.5f;
|
||||
// Actual smooth curve. Visualization:
|
||||
// http://www.wolframalpha.com/input/?i=plot%5B+0.5+*+%281+-+cos%5B2+*+pi+*+x%5D%29+for+x+%3D+%280%2C+1%29+%5D
|
||||
return 0.5f * (1 - cos( 2.0f * M_PI * x ) );
|
||||
}
|
||||
|
||||
|
||||
@@ -1856,7 +1860,10 @@ void QuaternionMult( const Quaternion &p, const Quaternion &q, Quaternion &qt )
|
||||
|
||||
void QuaternionMatrix( const Quaternion &q, const Vector &pos, matrix3x4_t& matrix )
|
||||
{
|
||||
Assert( pos.IsValid() );
|
||||
if ( !HushAsserts() )
|
||||
{
|
||||
Assert( pos.IsValid() );
|
||||
}
|
||||
|
||||
QuaternionMatrix( q, matrix );
|
||||
|
||||
@@ -1868,7 +1875,10 @@ void QuaternionMatrix( const Quaternion &q, const Vector &pos, matrix3x4_t& matr
|
||||
void QuaternionMatrix( const Quaternion &q, matrix3x4_t& matrix )
|
||||
{
|
||||
Assert( s_bMathlibInitialized );
|
||||
Assert( q.IsValid() );
|
||||
if ( !HushAsserts() )
|
||||
{
|
||||
Assert( q.IsValid() );
|
||||
}
|
||||
|
||||
#ifdef _VPROF_MATHLIB
|
||||
VPROF_BUDGET( "QuaternionMatrix", "Mathlib" );
|
||||
|
||||
Reference in New Issue
Block a user