summaryrefslogtreecommitdiffstats
path: root/include/misc.h
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--include/misc.h19
1 files changed, 19 insertions, 0 deletions
diff --git a/include/misc.h b/include/misc.h
new file mode 100644
index 0000000..a0b235c
--- /dev/null
+++ b/include/misc.h
@@ -0,0 +1,19 @@
+#pragma once
+
+#include <stdbool.h>
+
+#include "misc.h"
+#include "vector.h"
+
+#define MRAD_IN_DEG 17.45329252
+
+double linearConversion(double min_from,
+ double max_from,
+ double value,
+ double min_to,
+ double max_to,
+ bool clip);
+
+static inline double MRAD_TO_DEG(double d) {
+ return d / MRAD_IN_DEG;
+}