1
0
Fork 0
mirror of https://github.com/zeldaret/oot.git synced 2025-02-15 11:26:19 +00:00

Add DEG_TO_BINANG (unused by oot) (for completeness)

This commit is contained in:
Dragorn421 2022-04-03 21:14:16 +02:00
parent be9ba94ce3
commit a5bae4ea01
No known key found for this signature in database
GPG key ID: C182A3A3996E8201

View file

@ -97,6 +97,7 @@ typedef struct {
#define IS_ZERO(f) (fabsf(f) < 0.008f)
// Angle conversion macros
#define DEG_TO_BINANG(degrees) (s16)((degrees) * (0x8000 / 180.0f))
#define DEG_TO_BINANG_ALT(degreesf) (s16)((degreesf) * 182.04167f + .5f)
#define RADF_TO_BINANG(radf) (s16)((radf) * (0x8000 / M_PI))
#define RADF_TO_DEGF(radf) ((radf) * (180.0f / M_PI))