diff options
| author | Derek Hensley <hensley.derek58@gmail.com> | 2024-06-03 11:33:03 -0700 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-06-03 14:33:03 -0400 |
| commit | f26e77ba4088f20e72e13409f9ad535039abd291 (patch) | |
| tree | fa39e6c8bb57bfe5729854c8ea2bd3e25ea4155f /src/code/z_player_lib.c | |
| parent | 312b65d5e34878df4b70d8b9922e1082213b3662 (diff) | |
More General Cleanup (#1638)
* LINKER_FILES in makefile
* COLPOLY_GET_NORMAL
* math header
* libc
* M_PI for cosf and sinf files
* MAXFLOAT
* Revert "MAXFLOAT"
This reverts commit 96b75ffaa89b1a4ca1c08278b28bc3c70224701a.
* Remove SHT_MINV
* SHRT_MAX
* Add M_PI
* Angle macros
* f suffix
* Format
Diffstat (limited to 'src/code/z_player_lib.c')
| -rw-r--r-- | src/code/z_player_lib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/code/z_player_lib.c b/src/code/z_player_lib.c index bfe41894e..f08a1f4b5 100644 --- a/src/code/z_player_lib.c +++ b/src/code/z_player_lib.c @@ -1812,9 +1812,9 @@ void Player_AdjustSingleLeg(PlayState* play, Player* player, SkelAnime* skelAnim temp_f20 = (temp_f20 < 0.0f) ? 0.0f : sqrtf(temp_f20); sp48 = Math_FAtan2F(temp_f20, sp58); - phi_t1 = (M_PI - (Math_FAtan2F(sp54, temp_f20) + ((M_PI / 2.0f) - sp48))) * (0x8000 / M_PI); + phi_t1 = RAD_TO_BINANG(M_PIf - (Math_FAtan2F(sp54, temp_f20) + ((M_PIf / 2) - sp48))); phi_t1 = -skelAnime->jointTable[shinLimbIndex].z + phi_t1; - temp_f8 = (sp48 - sp4C) * (0x8000 / M_PI); + temp_f8 = RAD_TO_BINANG(sp48 - sp4C); if ((s16)(ABS_ALT(skelAnime->jointTable[shinLimbIndex].x) + ABS_ALT(skelAnime->jointTable[shinLimbIndex].y)) < 0) { |
