mirror of
https://github.com/zeldaret/oot.git
synced 2025-07-03 14:34:32 +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:
parent
791d9018c0
commit
3ce701cfd8
13 changed files with 36 additions and 34 deletions
|
@ -103,6 +103,7 @@ typedef struct {
|
|||
#define BINANG_TO_DEGF(binang) ((f32)(binang) * (360.0001525f / 65535.0f))
|
||||
#define BINANG_TO_RAD(binang) ((f32)(binang) * (M_PI / 0x8000))
|
||||
#define BINANG_TO_RAD_ALT(binang) (((f32)(binang) / (f32)0x8000) * M_PI)
|
||||
#define BINANG_TO_RAD_ALT2(binang) (((f32)(binang) * M_PI) / 0x8000)
|
||||
|
||||
// Vector macros
|
||||
#define SQXZ(vec) ((vec.x) * (vec.x) + (vec.z) * (vec.z))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue