summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/flui2d/flui2d.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/flui2d/flui2d.c b/src/modules/flui2d/flui2d.c
index 62dbbec..71238cd 100644
--- a/src/modules/flui2d/flui2d.c
+++ b/src/modules/flui2d/flui2d.c
@@ -218,8 +218,8 @@ static int flui2d_fragmenter(void *context, const fb_fragment_t *fragment, unsig
static void flui2d_prepare_frame(void *context, unsigned ticks, unsigned n_cpus, fb_fragment_t *fragment, rototiller_fragmenter_t *res_fragmenter)
{
flui2d_context_t *ctxt = context;
- static float r;
- int x = (cos(r += .01f) * .4f + .5f) * (float)ROOT; /* figure eight pattern for the added densities */
+ float r = (ticks % (unsigned)(2 * M_PI * 1000)) * .001f;
+ int x = (cos(r) * .4f + .5f) * (float)ROOT; /* figure eight pattern for the added densities */
int y = (sin(r * 2.f) * .4f + .5f) * (float)ROOT;
*res_fragmenter = flui2d_fragmenter;
© All Rights Reserved