summaryrefslogtreecommitdiff
path: root/misc.h
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-08-26 11:20:16 (GMT)
committer Simon <simon@hardwired.org.uk>2010-08-26 11:20:16 (GMT)
commit72a1d17fe42ccc74ac25328dcd272b7a2bf6856c (patch)
treea064555f1694f7c763eb3f42c56fe92ea016713b /misc.h
parent5751fea35f31640fddfaea1459503e366ae39729 (diff)
downloadpowder-72a1d17fe42ccc74ac25328dcd272b7a2bf6856c.zip
powder-72a1d17fe42ccc74ac25328dcd272b7a2bf6856c.tar.gz
This build works, but still a work in progress
Diffstat (limited to 'misc.h')
-rw-r--r--misc.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/misc.h b/misc.h
new file mode 100644
index 0000000..a42396d
--- /dev/null
+++ b/misc.h
@@ -0,0 +1,23 @@
+#ifndef UTILS_H
+#define UTILS_H
+
+//Signum function
+#ifdef WIN32
+extern _inline int sign(float i);
+#else
+extern inline int sign(float i);
+#endif
+
+#ifdef WIN32
+extern _inline unsigned clamp_flt(float f, float min, float max);
+#else
+extern inline unsigned clamp_flt(float f, float min, float max);
+#endif
+
+#ifdef WIN32
+extern _inline float restrict_flt(float f, float min, float max);
+#else
+extern inline float restrict_flt(float f, float min, float max);
+#endif
+
+#endif \ No newline at end of file