diff --git a/ch2/ch2-mandelbrot/src/main.rs b/ch2/ch2-mandelbrot/src/main.rs index a887cef0..8fb7dcfc 100644 --- a/ch2/ch2-mandelbrot/src/main.rs +++ b/ch2/ch2-mandelbrot/src/main.rs @@ -17,8 +17,8 @@ fn calculate_mandelbrot( // <2> let mut row: Vec = Vec::with_capacity(height); for img_x in 0..width { - let x_percent = (img_x as f64 / width as f64); - let y_percent = (img_y as f64 / height as f64); + let x_percent = img_x as f64 / width as f64; + let y_percent = img_y as f64 / height as f64; let cx = x_min + (x_max - x_min) * x_percent; // <8> let cy = y_min + (y_max - y_min) * y_percent; // <8> let escaped_at = mandelbrot_at_point(cx, cy, max_iters);