summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSimon <simon@hardwired.org.uk>2010-08-26 11:20:39 (GMT)
committer Simon <simon@hardwired.org.uk>2010-08-26 11:20:39 (GMT)
commit2e9edbd99ac05d37c3db22a8b8e984b8cddbdda0 (patch)
treefc274dd604e3c3476c3e9229262890422c31a721
parent72a1d17fe42ccc74ac25328dcd272b7a2bf6856c (diff)
downloadpowder-2e9edbd99ac05d37c3db22a8b8e984b8cddbdda0.zip
powder-2e9edbd99ac05d37c3db22a8b8e984b8cddbdda0.tar.gz
Remove utils.c
-rw-r--r--utils.c41
-rw-r--r--utils.h23
2 files changed, 0 insertions, 64 deletions
diff --git a/utils.c b/utils.c
deleted file mode 100644
index dfa9a3b..0000000
--- a/utils.c
+++ /dev/null
@@ -1,41 +0,0 @@
-#include "utils.h"
-
-//Signum function
-#ifdef WIN32
-_inline int sign(float i)
-#else
-inline int sign(float i)
-#endif
-{
- if (i<0)
- return -1;
- if (i>0)
- return 1;
- return 0;
-}
-
-#ifdef WIN32
-_inline unsigned clamp_flt(float f, float min, float max)
-#else
-inline unsigned clamp_flt(float f, float min, float max)
-#endif
-{
- if(f<min)
- return 0;
- if(f>max)
- return 255;
- return (int)(255.0f*(f-min)/(max-min));
-}
-
-#ifdef WIN32
-_inline float restrict_flt(float f, float min, float max)
-#else
-inline float restrict_flt(float f, float min, float max)
-#endif
-{
- if(f<min)
- return min;
- if(f>max)
- return max;
- return f;
-} \ No newline at end of file
diff --git a/utils.h b/utils.h
deleted file mode 100644
index 71c1df0..0000000
--- a/utils.h
+++ /dev/null
@@ -1,23 +0,0 @@
-#ifndef UTILS_H
-#define UTILS_H
-
-//Signum function
-#ifdef WIN32
-_inline int sign(float i);
-#else
-inline int sign(float i);
-#endif
-
-#ifdef WIN32
-_inline unsigned clamp_flt(float f, float min, float max);
-#else
-inline unsigned clamp_flt(float f, float min, float max);
-#endif
-
-#ifdef WIN32
-_inline float restrict_flt(float f, float min, float max);
-#else
-inline float restrict_flt(float f, float min, float max);
-#endif
-
-#endif \ No newline at end of file