summaryrefslogtreecommitdiff
path: root/snowglobe-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'snowglobe-internal.h')
-rw-r--r--snowglobe-internal.h11
1 files changed, 4 insertions, 7 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)