From 2c5c30042048a5b76273d5366d66f4a03cb5232a Mon Sep 17 00:00:00 2001 From: kerwizzy Date: Sun, 25 Nov 2018 12:31:35 +0000 Subject: [PATCH] Mandelbrot: Fix bug that allowed the view to become mirrored. Change-Id: I88caf3c712bad30fa077bc8c0290b4706541c2b0 Reviewed-on: https://review.haiku-os.org/731 Reviewed-by: waddlesplash --- src/apps/mandelbrot/Mandelbrot.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/apps/mandelbrot/Mandelbrot.cpp b/src/apps/mandelbrot/Mandelbrot.cpp index 40cba89d04..7735d7901d 100644 --- a/src/apps/mandelbrot/Mandelbrot.cpp +++ b/src/apps/mandelbrot/Mandelbrot.cpp @@ -242,7 +242,7 @@ void FractalView::MouseUp(BPoint where) centerY = lt.y + dragFrame.Height() / 2; SetLocationFromFrame(centerX, centerY); - fSize = (dragFrame.Width() * fSize) / frame.Width(); + fSize = std::fabs((dragFrame.Width() * fSize) / frame.Width()); } else { if (fMouseButtons & B_PRIMARY_MOUSE_BUTTON) { SetLocationFromFrame(where.x, where.y);