summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mikos <metastability@opencompositing.org>2008-01-29 10:32:09 +1030
committerDavid Mikos <metastability@opencompositing.org>2008-01-29 10:32:09 +1030
commit128fa75781bc4d917b091be482085dd465e3eea8 (patch)
treee87f1c3c1a346a5bd0d0dbbc3d4b89c363a9fa7e
parent03c9bfdc9b7de73032420b5968eaff69976b38da (diff)
downloadsnowglobe-128fa75781bc4d917b091be482085dd465e3eea8.tar.gz
snowglobe-128fa75781bc4d917b091be482085dd465e3eea8.tar.bz2
Remove util.c as util functions -> macros.
-rw-r--r--snowglobe-internal.h11
-rw-r--r--util.c24
2 files changed, 4 insertions, 31 deletions
diff --git a/snowglobe-internal.h b/snowglobe-internal.h
index 4db8748..1e68d2a 100644
--- a/snowglobe-internal.h
+++ b/snowglobe-internal.h
@@ -19,7 +19,10 @@
#include <math.h>
#include <float.h>
-#include <math.h>
+//return random number in range [0,x)
+#define randf(x) ((float) (rand()/(((double)RAND_MAX + 1)/(x))))
+
+
#include <compiz-core.h>
#include <compiz-cube.h>
@@ -163,12 +166,6 @@ void finDrawSnowflake(void);
void DrawSnowman (int);
-//utility methods
-float randf(float); //random float
-float minimum(float,float); //my compiler at home didn't have min or fminf!
-float maximum(float,float); //nor did it have max or fmaxf!
-float symmDistr(void); //symmetric distribution
-
//All calculations that matter with angles are done clockwise from top.
//I think of it as x=radius, y=0 being the top (towards 1st desktop from above view)
diff --git a/util.c b/util.c
deleted file mode 100644
index 2a3648f..0000000
--- a/util.c
+++ /dev/null
@@ -1,24 +0,0 @@
-//a collection of utility methods
-
-#include "snowglobe-internal.h"
-#include <math.h>
-#include <float.h>
-
-
-float
-randf (float x)
-{ //return random number in range [0,x)
- return rand()/(((double)RAND_MAX + 1) / x);
-}
-
-float
-minimum (float x, float y)
-{
- return ((x) < (y) ? (x) : (y));
-}
-
-float
-maximum (float x, float y)
-{
- return ((x) > (y) ? (x) : (y));
-}