summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorDavid Mikos <metastability@opencompositing.org>2008-01-27 12:27:02 +1030
committerDavid Mikos <metastability@opencompositing.org>2008-01-27 12:27:02 +1030
commitb6f81794236e48cf3b1abff8fa93f1771f37eb6d (patch)
treeef253c97622c9a260e800082c7df18e3c171d537 /util.c
parent384587f960f8a6a70394286acb8ad655e877b144 (diff)
downloadrubik-b6f81794236e48cf3b1abff8fa93f1771f37eb6d.tar.gz
rubik-b6f81794236e48cf3b1abff8fa93f1771f37eb6d.tar.bz2
Possibly work better with multiple monitors. Default settings change.
Diffstat (limited to 'util.c')
-rw-r--r--util.c9
1 files changed, 3 insertions, 6 deletions
diff --git a/util.c b/util.c
index 025a912..278e192 100644
--- a/util.c
+++ b/util.c
@@ -9,22 +9,19 @@ 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));
}
-float
-symmDistr()
-{ //returns number in range [-1, 1] with bias towards 0, symmetric about 0.
- float x = 2*randf(1)-1;
- return x*(1-cbrt(1-fabsf(x)));
-}
+
void
setColor(float* color, float r, float g, float b, float a,
float randomOffset, float randomness)