summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Mikos <metastability@opencompositing.org>2007-12-26 10:22:44 +1030
committerDavid Mikos <metastability@opencompositing.org>2007-12-26 10:22:44 +1030
commita8e9cf4135de14ed211764ed490392b0b9e66e0c (patch)
treee79afb2497654546ac7c2dcc19dbb466cc523eed
parente8fd620a199016fa17c69bc0da75c9ea3f473776 (diff)
downloadsnowglobe-0.6.0.tar.gz
snowglobe-0.6.0.tar.bz2
More random spread of snowflakes.0.6.0
-rw-r--r--movement.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/movement.c b/movement.c
index 24c8b69..69ed55d 100644
--- a/movement.c
+++ b/movement.c
@@ -20,7 +20,9 @@ void newSnowflakePosition(SnowglobeScreen *as, int i) {
ang += (0.5+((float) sector))*2*PI/q;
ang = fmodf(ang,2*PI);
- float d = randf(r)*factor;
+ float d = randf(1);
+ d=(1-d*d)*r*factor;
+
as->snow[i].x = d*cosf(ang);
as->snow[i].y = d*sinf(ang);
as->snow[i].z = 0.5;