very very minor optimization?
This commit is contained in:
parent
dd386d12a9
commit
5b8bd44c24
|
@ -101,15 +101,15 @@ private:
|
||||||
|
|
||||||
if ((w0 & 0x1) && !(w1 & 0x1))
|
if ((w0 & 0x1) && !(w1 & 0x1))
|
||||||
{
|
{
|
||||||
this->w0n = w0 - 1;
|
this->w0n = w0 - 1 >> 1;
|
||||||
this->w0d = w0 + 1;
|
this->w0d = w0 + 1 >> 1;
|
||||||
this->w1d = w1;
|
this->w1d = w1 >> 1;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
this->w0n = w0 & 0xFFFE;
|
this->w0n = w0 >> 1;
|
||||||
this->w0d = w0 & 0xFFFE;
|
this->w0d = w0 >> 1;
|
||||||
this->w1d = w1 & 0xFFFE;
|
this->w1d = w1 >> 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
this->shift = 9;
|
this->shift = 9;
|
||||||
|
@ -138,7 +138,7 @@ private:
|
||||||
// this seems to be a proper division on hardware :/
|
// this seems to be a proper division on hardware :/
|
||||||
// I haven't been able to find cases that produce imperfect output
|
// I haven't been able to find cases that produce imperfect output
|
||||||
if (den == 0) yfactor = 0;
|
if (den == 0) yfactor = 0;
|
||||||
else yfactor = (s32)(num / den);
|
else yfactor = ((u32)num / den);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue