Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: unnecessary parentheses around assigned value #90

Open
wants to merge 1 commit into
base: 1st-edition
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions ch2/ch2-mandelbrot/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ fn calculate_mandelbrot( // <2>
let mut row: Vec<usize> = 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);
Expand Down