summaryrefslogtreecommitdiffhomepage
path: root/src/math/rodeo_math.c
diff options
context:
space:
mode:
authorrealtradam <[email protected]>2023-06-16 01:18:13 -0400
committerrealtradam <[email protected]>2023-06-16 01:18:13 -0400
commita47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807 (patch)
treef7e358545f5043df20695d0cf51dcf8caa10cb12 /src/math/rodeo_math.c
parent425516a9c53183179c43517f1b6501a790378a05 (diff)
downloadRodeoKit-a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807.tar.gz
RodeoKit-a47cc44ef7191d03f8ca1b8d4e6b9dd34fba1807.zip
matrix math wrapper as well as various refactors for consistant and cleaner code
Diffstat (limited to 'src/math/rodeo_math.c')
-rw-r--r--src/math/rodeo_math.c20
1 files changed, 20 insertions, 0 deletions
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;
+}
+