mirror of
https://github.com/DrBeef/Raze.git
synced 2024-11-15 17:01:51 +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>
|
template <int rotations>
|
||||||
static int getofs_viewtype(int angDiff)
|
static int getofs_viewtype(int angDiff)
|
||||||
{
|
{
|
||||||
return ((angDiff + 3072 + (1024/rotations)) & 2047) / (2048/rotations);
|
return (((angDiff + 3072) & 2047) * rotations + 1024) >> 11;
|
||||||
}
|
}
|
||||||
|
|
||||||
template <int rotations>
|
template <int rotations>
|
||||||
|
|
Loading…
Reference in a new issue