The lrintf function should use "long" instead of "int"
for the type of its internal variable.
This commit is contained in:
parent
3e5715a994
commit
6ab100903e
|
@ -104,7 +104,7 @@ static INLINE long lrintf(float f){
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
static INLINE long lrintf(float x){
|
static INLINE long lrintf(float x){
|
||||||
int r;
|
long r;
|
||||||
if (x>=0.f)
|
if (x>=0.f)
|
||||||
{
|
{
|
||||||
x+=0.5f;
|
x+=0.5f;
|
||||||
|
@ -113,7 +113,7 @@ static INLINE long lrintf(float x){
|
||||||
{
|
{
|
||||||
x-=0.5f;
|
x-=0.5f;
|
||||||
}
|
}
|
||||||
r = (int)(x);
|
r = (long)(x);
|
||||||
if ( x != (float)(r) ) return r;
|
if ( x != (float)(r) ) return r;
|
||||||
return 2*(r/2);
|
return 2*(r/2);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue