1 parent 7bf1d62 commit 71b1202Copy full SHA for 71b1202
1 file changed
graphics/mandelbrot.py
@@ -27,11 +27,11 @@ def get_distance(x: float, y: float, max_step: int) -> float:
27
constituted by this x-y-pair diverges. Members of the Mandelbrot set do not
28
diverge so their distance is 1.
29
30
- >>> getDistance(0, 0, 50)
+ >>> get_distance(0, 0, 50)
31
1.0
32
- >>> getDistance(0.5, 0.5, 50)
+ >>> get_distance(0.5, 0.5, 50)
33
0.061224489795918366
34
- >>> getDistance(2, 0, 50)
+ >>> get_distance(2, 0, 50)
35
0.0
36
"""
37
a = x
@@ -118,7 +118,7 @@ def get_image(
118
figure_x = figure_center_x + (image_x / image_width - 0.5) * figure_width
119
figure_y = figure_center_y + (image_y / image_height - 0.5) * figure_height
120
121
- distance = getDistance(figure_x, figure_y, max_step)
+ distance = get_distance(figure_x, figure_y, max_step)
122
123
# color the corresponding pixel based on the selected coloring-function
124
if use_distance_color_coding:
0 commit comments