summaryrefslogtreecommitdiff
path: root/rubik-internal.h
diff options
context:
space:
mode:
Diffstat (limited to 'rubik-internal.h')
-rw-r--r--rubik-internal.h8
1 files changed, 4 insertions, 4 deletions
diff --git a/rubik-internal.h b/rubik-internal.h
index 6758d36..6a0769d 100644
--- a/rubik-internal.h
+++ b/rubik-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>
@@ -162,9 +165,6 @@ void updateSpeedFactor(float);
//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!
void setColor(float *, float, float, float, float, float, float);
void setSpecifiedColor (float *, int);
void rotateClockwise (squareRec * square);