[gegl] plasma: Update the perturbation computation



commit bc5d2e34e4749106ab8e524dd6b5c43054e09704
Author: Mukund Sivaraman <muks banu com>
Date:   Thu Jun 30 14:26:23 2011 +0530

    plasma: Update the perturbation computation

 operations/workshop/plasma.c |    5 +----
 1 files changed, 1 insertions(+), 4 deletions(-)
---
diff --git a/operations/workshop/plasma.c b/operations/workshop/plasma.c
index 0a8a7c7..eef1893 100644
--- a/operations/workshop/plasma.c
+++ b/operations/workshop/plasma.c
@@ -74,16 +74,13 @@ add_random (GRand  *gr,
 {
   gint    i;
   gfloat  tmp;
-  gdouble rnd;
-
 
   amount /= 2;
-  rnd = fabs(fmod(amount, 1));
 
   if (amount > 0)
     for (i = 0; i < floats_per_pixel-1; i++)
        {
-          tmp = dest[i] + (gfloat) g_rand_double_range(gr, -rnd, rnd);
+          tmp = dest[i] + (gfloat) g_rand_double_range(gr, -amount, amount);
           dest[i] = CLAMP (tmp, 0, 1);
        }
 }



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]