From 9ea5e14348e990968584e372c329688445306ec7 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Mon, 21 Feb 2022 15:54:35 -0500 Subject: maybe need that??? i'm a cat --- src/spatial.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/spatial.c b/src/spatial.c index e49f668..a0cd29b 100644 --- a/src/spatial.c +++ b/src/spatial.c @@ -68,6 +68,16 @@ static void rotate(xas_spatial_rotation rotation, coord->z = Yz; } +static inline float degf(float rad) { + float ret = (rad / M_PI) * 180.0f; + + while (ret >= 360.0f) { + ret -= 360.0f; + } + + return ret; +} + static int within_cone(xas_spatial_coord coord, xas_spatial_cone cone) { xas_spatial_rotation rotation = { -- cgit v1.2.3