summaryrefslogtreecommitdiff
path: root/glm/util.ha
diff options
context:
space:
mode:
authorLassi Pulkkinen <lassi@pulk.fi>2024-10-31 03:11:21 +0200
committerLassi Pulkkinen <lassi@pulk.fi>2024-10-31 03:51:35 +0200
commitae44478b30d890fe0fb04022f44d474dcdcc3f9d (patch)
tree5f462459ae4b47d22114eed717d1382d08cf4dfe /glm/util.ha
Initial commit (import old repo)HEADmain
Diffstat (limited to 'glm/util.ha')
-rw-r--r--glm/util.ha9
1 files changed, 9 insertions, 0 deletions
diff --git a/glm/util.ha b/glm/util.ha
new file mode 100644
index 0000000..02e4afc
--- /dev/null
+++ b/glm/util.ha
@@ -0,0 +1,9 @@
+use math;
+
+export fn rad(deg: f32) f32 = {
+ return deg * math::PI: f32 / 180.0;
+};
+
+export fn deg(rad: f32) f32 = {
+ return rad * 180.0 / math::PI: f32;
+};