From: Timo Kokkonen Date: Tue, 3 May 2011 19:39:49 +0000 (+0300) Subject: Move debug print into a better place X-Git-Url: http://git.itanic.dy.fi/?p=mandelbrot;a=commitdiff_plain;h=00e86273a70f20cb6575b407f0413ca019dbe6de Move debug print into a better place It is easier to control what to print here. For example, we can print out the zoom value. Signed-off-by: Timo Kokkonen --- diff --git a/mandelbrot.c b/mandelbrot.c index 926b6af..8ce33b9 100644 --- a/mandelbrot.c +++ b/mandelbrot.c @@ -49,8 +49,6 @@ int draw_mandelbrot(struct SDL_Surface *screen, double x1, double x2, double x0, y0, xlen, ylen, xstep, ystep; int iteration, xs, ys; - printf("Drawing area (%f, %f)(%f, %f)\n", x1, y1, x2, y2); - xlen = x2 - x1; ylen = y2 - y1; xstep = xlen / (double)screen->w; @@ -167,6 +165,8 @@ static void loop(struct context *ctx) ctx->origo_x + aspect_ratio / ctx->zoom, ctx->origo_y - 1 / ctx->zoom, ctx->origo_y + 1 / ctx->zoom); + printf("Drawing area (%f, %f)(%f, %f), zoom %d\n", + x1, y1, x2, y2, ctx->zoom ); } while (!read_events(ctx)); }