fix that with less warnings
This commit is contained in:
parent
55122bb9fa
commit
f2dc074b40
|
@ -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));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue