1
0
Fork 0
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:
Dragorn421 2022-03-21 00:33:29 +01:00 committed by GitHub
parent c42c172e72
commit 4729ac131a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
17 changed files with 37 additions and 41 deletions

View file

@ -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;
}