diff options
author | XANTRONIX Development | 2022-02-21 15:54:35 -0500 |
---|---|---|
committer | XANTRONIX Development | 2022-02-21 15:54:35 -0500 |
commit | 9ea5e14348e990968584e372c329688445306ec7 (patch) | |
tree | 3280473f5be72dcc4b5d498b837ce804053acda0 | |
parent | 4ba4cb1eb4d047ef887d439c5fa012b6c38a2ed5 (diff) | |
download | xas-9ea5e14348e990968584e372c329688445306ec7.tar.gz xas-9ea5e14348e990968584e372c329688445306ec7.tar.bz2 xas-9ea5e14348e990968584e372c329688445306ec7.zip |
maybe need that??? i'm a cat
-rw-r--r-- | src/spatial.c | 10 |
1 files changed, 10 insertions, 0 deletions
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 = { |