diff options
Diffstat (limited to 'src/math/rodeo_math.c')
| -rw-r--r-- | src/math/rodeo_math.c | 20 |
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; +} + |
