fix that with less warnings

This commit is contained in:
zeromus 2011-08-23 22:27:29 +00:00
parent 55122bb9fa
commit f2dc074b40
1 changed files with 2 additions and 2 deletions

View File

@ -529,13 +529,13 @@ static FORCEINLINE s32 Interpolate(SPUInterpolationMode INTERPOLATE_MODE, s32 a,
ratio = ratio - sputrunc(ratio); ratio = ratio - sputrunc(ratio);
double ratio2 = ((1.0 - cos(ratio * M_PI)) * 0.5); double ratio2 = ((1.0 - cos(ratio * M_PI)) * 0.5);
//double ratio2 = (1.0f - cos_lut[((int)(ratio*256.0))&0xFF]) / 2.0f; //double ratio2 = (1.0f - cos_lut[((int)(ratio*256.0))&0xFF]) / 2.0f;
return (s32)(((1-ratio2)*a) + (ratio2*b)); return s32floor((float)(((1-ratio2)*a) + (ratio2*b)));
} }
else else
{ {
//linear interpolation //linear interpolation
ratio = ratio - sputrunc(ratio); ratio = ratio - sputrunc(ratio);
return s32floor((1-ratio)*a + ratio*b); return s32floor((float)((1-ratio)*a + ratio*b));
} }
} }