mirror of
https://github.com/ZDoom/Raze.git
synced 2024-11-15 08:51:24 +00:00
Optimize getofs_viewtype for precision and speed.
git-svn-id: https://svn.eduke32.com/eduke32@6307 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
parent
42a26b5f3c
commit
4a69eecc9f
1 changed files with 1 additions and 1 deletions
|
@ -3421,7 +3421,7 @@ static int G_MaybeTakeOnFloorPal(uspritetype *pSprite, int sectNum)
|
|||
template <int rotations>
|
||||
static int getofs_viewtype(int angDiff)
|
||||
{
|
||||
return ((angDiff + 3072 + (1024/rotations)) & 2047) / (2048/rotations);
|
||||
return (((angDiff + 3072) & 2047) * rotations + 1024) >> 11;
|
||||
}
|
||||
|
||||
template <int rotations>
|
||||
|
|
Loading…
Reference in a new issue