1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-07-03 14:34:32 +00:00

Angle cleanup - BINANG_TO_RAD, BINANG_TO_RAD_ALT (#1158)

* Run formatter

* Touch up angle macros (parentheses and hex constants)

* Add `BINANG_TO_RAD_ALT`

* Swap `BINANG_TO_RAD` and `BINANG_TO_RAD_ALT`

* Run formatter
This commit is contained in:
Dragorn421 2022-03-20 01:16:33 +01:00 committed by GitHub
parent 4f6967b027
commit 0e5ecdcd73
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
65 changed files with 170 additions and 170 deletions

View file

@ -102,7 +102,8 @@ typedef struct {
#define BINANG_SUB(a, b) ((s16)((a) - (b)))
#define DEG_TO_RAD(degrees) ((degrees) * (M_PI / 180.0f))
#define BINANG_TO_DEGF(binang) ((f32)(binang) * (360.0001525f / 65535.0f))
#define BINANG_TO_RAD(binang) (((f32)(binang) / (f32)0x8000) * M_PI)
#define BINANG_TO_RAD(binang) ((f32)(binang) * (M_PI / 0x8000))
#define BINANG_TO_RAD_ALT(binang) (((f32)(binang) / (f32)0x8000) * M_PI)
// Vector macros
#define SQXZ(vec) ((vec.x) * (vec.x) + (vec.z) * (vec.z))