fn pixel_to_point(bounds: (usize, usize),
				  pixel: (usize, usize),
				  upper_left: Complex<f64>,
				  lower_right: Complex<f64>)
	-> Complex<f64>
{
	let (width, height) = (lower_right.re - upper_left.re,
						   upper_left.im - lower_right.im);
    // 10.  pixel.0 refers to the first element of the tuple pixel.
    // 11.  `as f64` is Rust’s syntax for a type conversion: this converts
    //      pixel.0 to an f64 value.
	Complex {
		re: upper_left.re + pixel.0 as f64 * width  / bounds.0 as f64,
		im: upper_left.im - pixel.1 as f64 * height / bounds.1 as f64
			// Why subtraction here? pixel.1 increases as we go down,
			// but the imaginary component increases as we go up.
	}
}
/// Given the row and column of a pixel in the output image, return the
/// corresponding point on the complex plane.
///
/// `bounds` is a pair giving the width and height of the image in pixels.
/// `pixel` is a (column, row) pair indicating a particular pixel in that image.
/// The `upper_left` and `lower_right` parameters are points on the complex
/// plane designating the area our image covers.
Given the row and column of a pixel in the output image, return the
corresponding point on the complex plane.

`bounds` is a pair giving the width and height of the image in pixels.
`pixel` is a (column, row) pair indicating a particular pixel in that image.
The `upper_left` and `lower_right` parameters are points on the complex
plane designating the area our image covers.
Given the row and column of a pixel in the output image return the corresponding point on the complex plane . ` bounds ` is a pair giving the width and height of the image in pixels . ` pixel ` is a ( column row ) pair indicating a particular pixel in that image . The ` upper_left ` and ` lower_right ` parameters are points on the complex plane designating the area our image covers .
fn pixel_to_point(bounds: (usize, usize),
				  pixel: (usize, usize),
				  upper_left: Complex<f64>,
				  lower_right: Complex<f64>)
	-> Complex<f64>
{
	let (width, height) = (lower_right.re - upper_left.re,
						   upper_left.im - lower_right.im);
    // 10.  pixel.0 refers to the first element of the tuple pixel.
    // 11.  `as f64` is Rust’s syntax for a type conversion: this converts
    //      pixel.0 to an f64 value.
	Complex {
		re: upper_left.re + pixel.0 as f64 * width  / bounds.0 as f64,
		im: upper_left.im - pixel.1 as f64 * height / bounds.1 as f64
			// Why subtraction here? pixel.1 increases as we go down,
			// but the imaginary component increases as we go up.
	}
}
fn pixel_to_point ( bounds : ( usize , usize ) , pixel : ( usize , usize ) , upper_left : Complex < f64 > , lower_right : Complex < f64 > ) -> Complex < f64 > { let ( width , height ) = ( lower_right . re - upper_left . re , upper_left . im - lower_right . im ) ; // 10.  pixel.0 refers to the first element of the tuple pixel. // 11.  `as f64` is Rust’s syntax for a type conversion: this converts //      pixel.0 to an f64 value. Complex { re : upper_left . re + pixel . 0 as f64 * width / bounds . 0 as f64 , im : upper_left . im - pixel . 1 as f64 * height / bounds . 1 as f64 // Why subtraction here? pixel.1 increases as we go down, // but the imaginary component increases as we go up. } }
Given the row and column of a pixel in the output image, return the
corresponding point on the complex plane.
Given the row and column of a pixel in the output image return the corresponding point on the complex plane .
bounds
(usize, usize)
pixel
(usize, usize)
upper_left
Complex<f64>
lower_right
Complex<f64>
bounds
(usize, usize)
pixel
(usize, usize)
upper_left
Complex<f64>
lower_right
Complex<f64>