powf -> Q_powf

This commit is contained in:
Jonathan Gray 2013-04-25 15:58:49 +10:00
parent f99cdcd1fa
commit e8391f9c09
5 changed files with 6 additions and 6 deletions

View file

@ -345,7 +345,7 @@ void CRMLandScape::Sprinkle(CCMPatch *patch, CCGHeightDetails *hd, int level)
// Get a number -5.3f to 5.3f
density = (mDensityMap[px + (common->GetBlockWidth() * py)] - 128) / 24.0f;
// ..and multiply that into the count
count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * powf(2.0f, density) * 0.001);
count = Round(common->GetPatchScalarSize() * hd->GetAverageFrequency() * Q_powf(2.0f, density) * 0.001);
for(i = 0; i < count; i++)
{

View file

@ -441,7 +441,7 @@ static void CG_UpdateThirdPersonTargetDamp(void)
// Note that since there are a finite number of "practical" delta millisecond values possible,
// the ratio should be initialized into a chart ultimately.
ratio = powf(dampfactor, dtime);
ratio = Q_powf(dampfactor, dtime);
// This value is how much distance is "left" from the ideal.
VectorMA(cameraIdealTarget, -ratio, targetdiff, cameraCurTarget);
@ -528,7 +528,7 @@ static void CG_UpdateThirdPersonCameraDamp(void)
// Note that since there are a finite number of "practical" delta millisecond values possible,
// the ratio should be initialized into a chart ultimately.
ratio = powf(dampfactor, dtime);
ratio = Q_powf(dampfactor, dtime);
// This value is how much distance is "left" from the ideal.
VectorMA(cameraIdealLoc, -ratio, locdiff, cameraCurLoc);

View file

@ -1470,7 +1470,7 @@ int Q_irand(int value1, int value2)
return irand(value1, value2);
}
float powf ( float x, int y )
float Q_powf ( float x, int y )
{
float r = x;
for ( y--; y>0; y-- )

View file

@ -1280,7 +1280,7 @@ float Q_rsqrt( float f ); // reciprocal square root
signed char ClampChar( int i );
signed short ClampShort( int i );
float powf ( float x, int y );
float Q_powf ( float x, int y );
// this isn't a real cheap function to call!
int DirToByte( vec3_t dir );

View file

@ -445,7 +445,7 @@ void CTRLandScape::CalculateLighting(void)
// Both normalised, so -1.0 < dp < 1.0
dp = Com_Clampi(0.0f, 1.0f, DotProduct(direction, total));
dp = powf(dp, 3);
dp = Q_powf(dp, 3);
VectorScale(ambient, (1.0 - dp) * 0.5, ambient);
VectorMA(ambient, dp, directed, tint);