summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorXANTRONIX Development2022-02-21 15:54:35 -0500
committerXANTRONIX Development2022-02-21 15:54:35 -0500
commit9ea5e14348e990968584e372c329688445306ec7 (patch)
tree3280473f5be72dcc4b5d498b837ce804053acda0 /src
parent4ba4cb1eb4d047ef887d439c5fa012b6c38a2ed5 (diff)
downloadxas-9ea5e14348e990968584e372c329688445306ec7.tar.gz
xas-9ea5e14348e990968584e372c329688445306ec7.tar.bz2
xas-9ea5e14348e990968584e372c329688445306ec7.zip
maybe need that??? i'm a cat
Diffstat (limited to 'src')
-rw-r--r--src/spatial.c10
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 = {