Permalink
Browse files

Move check after iteration formula, so that the last iteration is act…

…ually checked.
  • Loading branch information...
1 parent e38e37d commit c6e8dfc96037fe537343a06d181e2ae9b34d028a @colomon committed Dec 15, 2009
Showing with 1 addition and 1 deletion.
  1. +1 −1 mandelbrot.pl
View
@@ -10,8 +10,8 @@
sub mandel(Complex $c) {
my $z = 0i;
for ^$max_iterations {
- return 1 if ($z.abs > 2);
$z = $z * $z + $c;
+ return 1 if ($z.abs > 2);
}
return 0;
}

0 comments on commit c6e8dfc

Please sign in to comment.