very very minor optimization?

This commit is contained in:
Jaklyy 2024-08-06 13:28:42 -04:00
parent dd386d12a9
commit 5b8bd44c24
1 changed files with 7 additions and 7 deletions

View File

@ -101,15 +101,15 @@ private:
if ((w0 & 0x1) && !(w1 & 0x1))
{
this->w0n = w0 - 1;
this->w0d = w0 + 1;
this->w1d = w1;
this->w0n = w0 - 1 >> 1;
this->w0d = w0 + 1 >> 1;
this->w1d = w1 >> 1;
}
else
{
this->w0n = w0 & 0xFFFE;
this->w0d = w0 & 0xFFFE;
this->w1d = w1 & 0xFFFE;
this->w0n = w0 >> 1;
this->w0d = w0 >> 1;
this->w1d = w1 >> 1;
}
this->shift = 9;
@ -138,7 +138,7 @@ private:
// this seems to be a proper division on hardware :/
// I haven't been able to find cases that produce imperfect output
if (den == 0) yfactor = 0;
else yfactor = (s32)(num / den);
else yfactor = ((u32)num / den);
}
}