aboutsummaryrefslogtreecommitdiff
path: root/apps/mandelbrot.c
diff options
context:
space:
mode:
authorMarvin Borner2020-09-04 17:09:07 +0200
committerMarvin Borner2020-09-04 17:09:07 +0200
commit6938cb8093dc497160e24d8502cfc42a6adb1a6b (patch)
tree79418b037f1b2ef142a7af9e2a9421b337927f96 /apps/mandelbrot.c
parent538ac0e639ad190fe7dee0fb7029fb536761c471 (diff)
Mandelbrot performance and coloring
Diffstat (limited to 'apps/mandelbrot.c')
-rw-r--r--apps/mandelbrot.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/apps/mandelbrot.c b/apps/mandelbrot.c
index 2165217..6eef9ef 100644
--- a/apps/mandelbrot.c
+++ b/apps/mandelbrot.c
@@ -38,9 +38,10 @@ void draw_mandelbrot(struct window *win, int resolution)
}
srand(iteration);
if (iteration < max)
- draw_pixel(win, col, row, rand() | 0xff000000);
+ draw_pixel(win, col, row,
+ rand() << 16 | rand() << 8 | rand() | 0xff000000);
else
- draw_pixel(win, col, row, BG_COLOR);
+ draw_pixel(win, col, row, 0xff000000);
}
}
gui_redraw();