From 1fb5ae1a7514d4963de5be63d78a760df9cee493 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Boulogne?= Date: Sat, 12 Jan 2013 11:29:18 +0100 Subject: [PATCH] fix variable --- skimage/draw/_draw.pyx | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/skimage/draw/_draw.pyx b/skimage/draw/_draw.pyx index ff41410c..e3048de3 100644 --- a/skimage/draw/_draw.pyx +++ b/skimage/draw/_draw.pyx @@ -244,14 +244,14 @@ def circle_perimeter(int cy, int cx, int radius, method='bresenham'): y -= 1 x += 1 elif method == 'andres': - if err >= 2 * (x - 1): - err = err - 2*x + if d >= 2 * (x - 1): + d = d - 2*x x = x + 1 - elif err <= 2*(radius - y): - err = err + 2 * y - 1 + elif d <= 2*(radius - y): + d = d + 2 * y - 1 y = y - 1 else: - err = err + 2*(y - x - 1) + d = d + 2*(y - x - 1) y = y - 1 x = x + 1