mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-06 16:04:35 +00:00
Angle cleanup - DEG_TO_RAD
(#1157)
* Run formatter * Touch up angle macros (parentheses and hex constants) * Remove `DEGF_TO_RADF`, use `DEG_TO_RAD` instead * Remove `DEGTORAD`, use `DEG_TO_RAD` instead * Use `DEG_TO_RAD` more
This commit is contained in:
parent
c42c172e72
commit
4729ac131a
17 changed files with 37 additions and 41 deletions
|
@ -949,11 +949,11 @@ s32 func_800458D4(Camera* camera, VecSph* eyeAtDir, f32 arg2, f32* arg3, s16 arg
|
|||
deltaY = playerPosRot->pos.y - *arg3;
|
||||
eyeAtAngle = Math_FAtan2F(deltaY, OLib_Vec3fDistXZ(&camera->at, &camera->eye));
|
||||
|
||||
if (eyeAtAngle > DEGF_TO_RADF(OREG(32))) {
|
||||
if (eyeAtAngle > DEG_TO_RAD(OREG(32))) {
|
||||
if (1) {}
|
||||
phi_f2 = 1.0f - sinf(eyeAtAngle - DEGF_TO_RADF(OREG(32)));
|
||||
} else if (eyeAtAngle < DEGF_TO_RADF(OREG(33))) {
|
||||
phi_f2 = 1.0f - sinf(DEGF_TO_RADF(OREG(33)) - eyeAtAngle);
|
||||
phi_f2 = 1.0f - sinf(eyeAtAngle - DEG_TO_RAD(OREG(32)));
|
||||
} else if (eyeAtAngle < DEG_TO_RAD(OREG(33))) {
|
||||
phi_f2 = 1.0f - sinf(DEG_TO_RAD(OREG(33)) - eyeAtAngle);
|
||||
} else {
|
||||
phi_f2 = 1.0f;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue