diff options
Diffstat (limited to 'src/spatial.c')
-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 = { |