summaryrefslogtreecommitdiffstats
path: root/nebu/include/base/nebu_util.h
diff options
context:
space:
mode:
Diffstat (limited to 'nebu/include/base/nebu_util.h')
-rw-r--r--nebu/include/base/nebu_util.h20
1 files changed, 20 insertions, 0 deletions
diff --git a/nebu/include/base/nebu_util.h b/nebu/include/base/nebu_util.h
new file mode 100644
index 0000000..774e784
--- /dev/null
+++ b/nebu/include/base/nebu_util.h
@@ -0,0 +1,20 @@
+#ifndef NEBU_UTIL_H
+#define NEBU_UTIL_H
+
+/* small utility macros & functions */
+
+#include "base/nebu_types.h"
+#include <math.h>
+
+#define COS(X) cos( (X) * M_PI/180.0 )
+#define SIN(X) sin( (X) * M_PI/180.0 )
+
+#ifndef M_PI
+#define M_PI 3.141592654
+#endif
+
+void randomPermutation( int N, int *nodes );
+void clamp( float *f, float min, float max );
+void addList(List **l, void* data);
+
+#endif