better comments

master
neingeist 12 years ago
parent fbfdcdb33f
commit b12b4ff429

@ -28,8 +28,12 @@ void drawmandelbrot(SDL_Surface *surface) {
bool diverges = false;
float complex z = 0;
int it;
for (it = 1; it < 256; it++) {
const int max_it = 170;
for (it = 1; it <= max_it; it++) {
/* z = z² + c */
z = cpowf(z, 2) + c;
/* If |z| ever gets greater than 2, it diverges. */
if (cabs(z) > 2) {
diverges = true;
break;

Loading…
Cancel
Save