From a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807 Mon Sep 17 00:00:00 2001 From: realtradam Date: Fri, 16 Jun 2023 01:18:13 -0400 Subject: matrix math wrapper as well as various refactors for consistant and cleaner code --- src/math/rodeo_math.c | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 src/math/rodeo_math.c (limited to 'src/math/rodeo_math.c') diff --git a/src/math/rodeo_math.c b/src/math/rodeo_math.c new file mode 100644 index 0000000..20516e3 --- /dev/null +++ b/src/math/rodeo_math.c @@ -0,0 +1,20 @@ + +// -- internal -- +// public +#include "rodeo/math.h" + +// -- system -- +#include "math.h" + +float +rodeo_math_radians_to_turns(float radians) +{ + return (radians / mrodeo_math_pi) / 2.0f; +} + +float +rodeo_math_turns_to_radians(float turns) +{ + return turns * mrodeo_math_pi * 2.0f; +} + -- cgit v1.2.3