diff options
author | Vito Caputo <vcaputo@pengaru.com> | 2022-04-28 01:45:30 -0700 |
---|---|---|
committer | Vito Caputo <vcaputo@pengaru.com> | 2022-05-01 13:52:14 -0700 |
commit | 7dec62422b3b00f9a347d37f1e7f89e5bbaba0a9 (patch) | |
tree | f6cdb92e128ee089b077a81656c303e25336ddaf /src | |
parent | 5e8d2d487db792c13609e2e83890256d452873d9 (diff) |
modules/julia: randomize initial state
Same as for roto and plasma...
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/julia/julia.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/julia/julia.c b/src/modules/julia/julia.c index 48f85da..95846e3 100644 --- a/src/modules/julia/julia.c +++ b/src/modules/julia/julia.c @@ -67,7 +67,15 @@ static uint32_t colors[] = { static void * julia_create_context(unsigned ticks, unsigned n_cpus, til_setup_t *setup) { - return calloc(1, sizeof(julia_context_t)); + julia_context_t *ctxt; + + ctxt = calloc(1, sizeof(julia_context_t)); + if (!ctxt) + return NULL; + + ctxt->rr = ((float)rand()) / (float)RAND_MAX * 100.f; + + return ctxt; } |