[gegl] ripple: Set shift for the default case
- From: Mukund Sivaraman <muks src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gegl] ripple: Set shift for the default case
- Date: Mon, 5 Sep 2011 12:46:37 +0000 (UTC)
commit 0c35a0a62fae108239055a10b4da34b1df7c5123
Author: Mukund Sivaraman <muks banu com>
Date: Mon Sep 5 18:16:30 2011 +0530
ripple: Set shift for the default case
operations/workshop/ripple.c | 8 ++++----
1 files changed, 4 insertions(+), 4 deletions(-)
---
diff --git a/operations/workshop/ripple.c b/operations/workshop/ripple.c
index 0ff55d6..2370841 100644
--- a/operations/workshop/ripple.c
+++ b/operations/workshop/ripple.c
@@ -104,16 +104,16 @@ process (GeglOperation *operation,
switch (o->wave_type)
{
- case GEGl_RIPPLE_WAVE_TYPE_SINE:
- shift = o->amplitude * sin (2.0 * G_PI * nx / o->period + 2.0 * G_PI * o->phi);
- break;
-
case GEGl_RIPPLE_WAVE_TYPE_SAWTOOTH:
lambda = div (nx,o->period).rem - o->phi * o->period;
if (lambda < 0)
lambda += o->period;
shift = o->amplitude * (fabs (((lambda / o->period) * 4) - 2) - 1);
break;
+ case GEGl_RIPPLE_WAVE_TYPE_SINE:
+ default:
+ shift = o->amplitude * sin (2.0 * G_PI * nx / o->period + 2.0 * G_PI * o->phi);
+ break;
}
coordsx = x + shift * sin (angle_rad);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]