From a5bae4ea01fe271cb17947f7733ebcc5e475aa5f Mon Sep 17 00:00:00 2001 From: Dragorn421 Date: Sun, 3 Apr 2022 21:14:16 +0200 Subject: [PATCH] Add `DEG_TO_BINANG` (unused by oot) (for completeness) --- include/z64math.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/z64math.h b/include/z64math.h index eb3fdce6d6..351807cf6e 100644 --- a/include/z64math.h +++ b/include/z64math.h @@ -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))