1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-07 08:24:55 +00:00

Angle cleanup - miscellaneous (#1159)

* Add `BINANG_TO_RAD_ALT2`

* Few hex constants in place of decimal cardinal angles

* Use `BINANG_TO_DEGF` more

* Use `DEG_TO_RAD(int)` for angle literals

* `BINANG_TO_RAD_ALT(literal)` -> use `BINANG_TO_RAD`

* Somewhat arbitrary literal angles cleanup
This commit is contained in:
Dragorn421 2022-04-03 20:32:18 +02:00 committed by GitHub
parent 791d9018c0
commit 3ce701cfd8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
13 changed files with 36 additions and 34 deletions

View file

@ -39,9 +39,9 @@ f32 Math_PowF(f32 base, s32 exp) {
}
f32 Math_SinF(f32 angle) {
return sins((s16)(angle * (32767.0f / M_PI))) * SHT_MINV;
return sins((s16)(angle * (0x7FFF / M_PI))) * SHT_MINV;
}
f32 Math_CosF(f32 angle) {
return coss((s16)(angle * (32767.0f / M_PI))) * SHT_MINV;
return coss((s16)(angle * (0x7FFF / M_PI))) * SHT_MINV;
}