PI -> fPI

git-svn-id: https://svn.eduke32.com/eduke32@7343 1a8010ca-5511-0410-912e-c29ae57300e0
This commit is contained in:
terminx 2019-02-20 21:33:04 +00:00
parent a3f49b4584
commit 10757aa836
3 changed files with 5 additions and 5 deletions

View file

@ -909,8 +909,8 @@ void polymer_setaspect(int32_t ang)
float fang = (float)ang * atanf(fviewingrange*(1.f/65536.f)) * (4.f/fPI);
// use horizontal fov instead of vertical
fang = atanf(tanf(fang * (PI / 2048.f)) * float(windowxy2.y - windowxy1.y + 1) / float(windowxy2.x - windowxy1.x + 1) *
float(xdim) / float(ydim) * (3.f / 4.f)) * (2048.f / PI);
fang = atanf(tanf(fang * (fPI / 2048.f)) * float(windowxy2.y - windowxy1.y + 1) / float(windowxy2.x - windowxy1.x + 1) *
float(xdim) / float(ydim) * (3.f / 4.f)) * (2048.f / fPI);
if (pr_customaspect != 0.0f)
aspect = pr_customaspect;

View file

@ -792,7 +792,7 @@ void G_DrawRooms(int32_t playerNum, int32_t smoothRatio)
#endif
)));
viewingRange = Blrintf(float(vr) * tanf(ud.fov * (PI/360.f)));
viewingRange = Blrintf(float(vr) * tanf(ud.fov * (fPI/360.f)));
if (!r_usenewaspect)
renderSetAspect(viewingRange, yxaspect);

View file

@ -5365,7 +5365,7 @@ HORIZONLY:;
// A horiz diff of 128 equal 45 degrees,
// so we convert horiz to 1024 angle units
float horizAngle = atan2f(pPlayer->q16horiz - F16(100), F16(128)) * (512.f / PI) + fix16_to_float(g_player[playerNum].inputBits->q16horz);
float horizAngle = atan2f(pPlayer->q16horiz - F16(100), F16(128)) * (512.f / fPI) + fix16_to_float(g_player[playerNum].inputBits->q16horz);
if (TEST_SYNC_KEY(playerBits, SK_LOOK_UP))
{
@ -5405,7 +5405,7 @@ HORIZONLY:;
}
}
pPlayer->q16horiz = F16(100) + F16(128) * tanf(horizAngle * (PI / 512.f));
pPlayer->q16horiz = F16(100) + F16(128) * tanf(horizAngle * (fPI / 512.f));
if (pPlayer->return_to_center > 0 && !TEST_SYNC_KEY(playerBits, SK_LOOK_UP) && !TEST_SYNC_KEY(playerBits, SK_LOOK_DOWN))
{