Skip to content

Commit

Permalink
Increase zoom speed
Browse files Browse the repository at this point in the history
  • Loading branch information
vinc committed Oct 17, 2024
1 parent 49c8d95 commit 9feeb72
Showing 1 changed file with 5 additions and 13 deletions.
18 changes: 5 additions & 13 deletions src/bin/mandelbrot.rs
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,11 @@ fn main(args: &[&str]) {
'D' if csi => { // Arrow Left
x -= 0.2 / z;
}
' ' => { // Space
//let x_center = x + (1.5 / z);
//let y_center = y + (1.0 / z);
z *= 1.2; // Increase zoom
//x = x_center - (1.5 / z);
//y = y_center - (1.0 / z);
}
'\x08' => { // Backspace
//let x_center = x + (1.5 / z);
//let y_center = y + (1.0 / z);
z /= 1.2; // Increase zoom
//x = x_center - (1.5 / z);
//y = y_center - (1.0 / z);
' ' => { // Space: zoom in
z *= 1.5;
}
'\x08' => { // Backspace: zoom out
z /= 1.5;
}
_ => {}
}
Expand Down

0 comments on commit 9feeb72

Please sign in to comment.