summaryrefslogtreecommitdiff
path: root/src/modules/meta2d
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/meta2d')
-rw-r--r--src/modules/meta2d/meta2d.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/meta2d/meta2d.c b/src/modules/meta2d/meta2d.c
index 8b87804..d1063de 100644
--- a/src/modules/meta2d/meta2d.c
+++ b/src/modules/meta2d/meta2d.c
@@ -78,8 +78,9 @@ static void * meta2d_create_context(unsigned seed, unsigned ticks, unsigned n_cp
for (int i = 0; i < META2D_NUM_BALLS; i++) {
meta2d_ball_t *ball = &ctxt->balls[i];
+ /* TODO: add _r() variants of v[23]f_rand()? */
v2f_rand(&ball->position, &(v2f_t){-.7f, -.7f}, &(v2f_t){.7f, .7f});
- ball->radius = rand() / (float)RAND_MAX * .2f + .05f;
+ ball->radius = rand_r(&seed) / (float)RAND_MAX * .2f + .05f;
v3f_rand(&ball->color, &(v3f_t){0.f, 0.f, 0.f}, &(v3f_t){1.f, 1.f, 1.f});
}
© All Rights Reserved