X-Git-Url: http://git.itanic.dy.fi/?p=mandelbrot;a=blobdiff_plain;f=mandelbrot.c;h=9ca242101ae1bad4a2f98aa5e89387dee82f36f0;hp=a00be93beec714c0b81b177cf3cdaf4a548e2140;hb=HEAD;hpb=c33a92b00494936a1ba352ada8e61a203d7b5b54 diff --git a/mandelbrot.c b/mandelbrot.c index a00be93..9ca2421 100644 --- a/mandelbrot.c +++ b/mandelbrot.c @@ -163,7 +163,7 @@ static void loop(struct context *ctx) int last_zoom; do { - aspect_ratio = ctx->screen->w / ctx->screen->h; + aspect_ratio = ctx->screen->w / (long double)ctx->screen->h; ctx->origo_x += ctx->motion_x / ctx->zoom / ctx->screen->w; ctx->origo_y += ctx->motion_y / ctx->zoom / ctx->screen->h; ctx->motion_x = ctx->motion_y = 0;