[gegl] spherize: a few fixes



commit ebbd48e45616f0e20a1978bb77712efeef52f6e4
Author: Ell <ell_se yahoo com>
Date:   Mon Oct 2 19:57:20 2017 -0400

    spherize: a few fixes

 operations/workshop/spherize.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/operations/workshop/spherize.c b/operations/workshop/spherize.c
index 4ed58f8..c465ca6 100644
--- a/operations/workshop/spherize.c
+++ b/operations/workshop/spherize.c
@@ -205,7 +205,7 @@ process (GeglOperation       *operation,
 
   coangle_of_view_2 = MAX (180.0 - o->angle_of_view, 0.01) * G_PI / 360.0;
   focal_length      = tan (coangle_of_view_2);
-  cap_angle_2       = o->amount * coangle_of_view_2;
+  cap_angle_2       = fabs (o->amount) * coangle_of_view_2;
   cap_radius        = 1.0 / sin (cap_angle_2);
   cap_depth         = cap_radius * cos (cap_angle_2);
 
@@ -268,7 +268,7 @@ process (GeglOperation       *operation,
 
                   src_x = dx ? cx + src_d * x / (dx * d) :
                                i + 0.5;
-                  src_y = dy ? cy + src_d * y / (dx * d) :
+                  src_y = dy ? cy + src_d * y / (dy * d) :
                                j + 0.5;
 
                   gegl_sampler_get (sampler, src_x, src_y,


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