fix docstring + PEP8

This commit is contained in:
François Boulogne
2013-01-12 11:58:33 +01:00
parent 1fb5ae1a75
commit 3b84744c25
+4 -4
View File
@@ -198,7 +198,7 @@ def circle_perimeter(int cy, int cx, int radius, method='bresenham'):
Centre coordinate of circle.
radius: int
Radius of circle.
method : string
method : {'bresenham', 'andres'}, optional
bresenham : Bresenham method
andres : Andres method
@@ -245,13 +245,13 @@ def circle_perimeter(int cy, int cx, int radius, method='bresenham'):
x += 1
elif method == 'andres':
if d >= 2 * (x - 1):
d = d - 2*x
d = d - 2 * x
x = x + 1
elif d <= 2*(radius - y):
elif d <= 2 * (radius - y):
d = d + 2 * y - 1
y = y - 1
else:
d = d + 2*(y - x - 1)
d = d + 2 * (y - x - 1)
y = y - 1
x = x + 1