From: cristy Date: Thu, 10 Apr 2014 00:20:02 +0000 (+0000) Subject: (no commit message) X-Git-Tag: 7.0.1-0~2464 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=671a8dd0ddc92bd47a34a3ff9b2a3b419f365885;p=imagemagick --- diff --git a/MagickCore/effect.c b/MagickCore/effect.c index ad5d5e759..6ec76b2eb 100644 --- a/MagickCore/effect.c +++ b/MagickCore/effect.c @@ -1143,25 +1143,25 @@ MagickExport Image *CannyEdgeImage(const Image *image,const double radius, if (fabs(dx) > MagickEpsilon) { double - theta; + slope; - theta=dy/dx; - if (theta < 0.0) + slope=dy/dx; + if (slope < 0.0) { - if (theta < -2.41421356237) + if (slope < -2.41421356237) pixel.orientation=0; else - if (theta < -0.414213562373) + if (slope < -0.414213562373) pixel.orientation=1; else pixel.orientation=2; } else { - if (theta > 2.41421356237) + if (slope > 2.41421356237) pixel.orientation=0; else - if (theta > 0.414213562373) + if (slope > 0.414213562373) pixel.orientation=3; else pixel.orientation=2;