1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-08-22 06:52:03 +00:00

Angle cleanup - RADF_TO_BINANG (#1155)

* Run formatter

* Touch up angle macros (parentheses and hex constants)

* Use `RADF_TO_BINANG` more
This commit is contained in:
Dragorn421 2022-03-13 19:46:46 +01:00 committed by GitHub
parent aab5bc9211
commit 61b864a89c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
45 changed files with 120 additions and 128 deletions

View file

@ -1058,7 +1058,7 @@ s32 func_80AECF6C(EnRu1* this, GlobalContext* globalCtx) {
shapeRotY = &player->actor.shape.rot.y;
temp1 = this->actor.world.pos.x - player->actor.world.pos.x;
temp2 = this->actor.world.pos.z - player->actor.world.pos.z;
temp_f16 = Math_FAtan2F(temp1, temp2) * (0x8000 / M_PI);
temp_f16 = RADF_TO_BINANG(Math_FAtan2F(temp1, temp2));
if (*shapeRotY != temp_f16) {
Math_SmoothStepToS(shapeRotY, temp_f16, 0x14, 0x1838, 0x64);
player->actor.world.rot.y = *shapeRotY;