Browse Source

Fixed a comment for mandelbrot function

main
Unbewohnte 3 years ago
parent
commit
283713a45f
  1. 2
      Cargo.lock
  2. 2
      src/main.rs

2
Cargo.lock generated

@ -223,7 +223,7 @@ checksum = "e74d72e0f9b65b5b4ca49a346af3976df0f9c61d550727f349ecd559f251a26c"
[[package]]
name = "mandelplot"
version = "0.1.0"
version = "0.1.1"
dependencies = [
"clap",
"image",

2
src/main.rs

@ -27,7 +27,7 @@ use image::RgbImage;
use num::Complex;
/// z(n) = z(n-1)^2 + c
/// Returns amount of iterations to decide that given 'c' will escape to infinity
/// Returns amount of iterations to decide that z will escape to infinity
fn mandelbrot(c: num::Complex<f64>, iterations: u32) -> Option<u32> {
let mut z: Complex<f64> = num::Complex::new(0.0, 0.0);
for i in 0..iterations {

Loading…
Cancel
Save