mirror of
https://github.com/zeldaret/oot.git
synced 2025-08-23 23:41:24 +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:
parent
aab5bc9211
commit
61b864a89c
45 changed files with 120 additions and 128 deletions
|
@ -290,7 +290,7 @@ s32 EnCs_HandleWalking(EnCs* this, GlobalContext* globalCtx) {
|
|||
EnCs_GetPathPoint(globalCtx->setupPathList, &pathPos, this->path, this->waypoint);
|
||||
xDiff = pathPos.x - this->actor.world.pos.x;
|
||||
zDiff = pathPos.z - this->actor.world.pos.z;
|
||||
walkAngle1 = Math_FAtan2F(xDiff, zDiff) * (32768.0f / M_PI);
|
||||
walkAngle1 = RADF_TO_BINANG(Math_FAtan2F(xDiff, zDiff));
|
||||
this->walkAngle = walkAngle1;
|
||||
this->walkDist = sqrtf((xDiff * xDiff) + (zDiff * zDiff));
|
||||
|
||||
|
@ -305,7 +305,7 @@ s32 EnCs_HandleWalking(EnCs* this, GlobalContext* globalCtx) {
|
|||
EnCs_GetPathPoint(globalCtx->setupPathList, &pathPos, this->path, this->waypoint);
|
||||
xDiff = pathPos.x - this->actor.world.pos.x;
|
||||
zDiff = pathPos.z - this->actor.world.pos.z;
|
||||
walkAngle2 = Math_FAtan2F(xDiff, zDiff) * (32768.0f / M_PI);
|
||||
walkAngle2 = RADF_TO_BINANG(Math_FAtan2F(xDiff, zDiff));
|
||||
this->walkAngle = walkAngle2;
|
||||
this->walkDist = sqrtf((xDiff * xDiff) + (zDiff * zDiff));
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue