From 10c8992cf4781e903b573be42a15c086c64646c7 Mon Sep 17 00:00:00 2001 From: Matthew Gordon Date: Mon, 11 Nov 2019 16:48:40 -0500 Subject: [PATCH] Fix bug where camera would iterate past bottom of image. --- src/camera.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/camera.rs b/src/camera.rs index 81a89ae..53b0883 100644 --- a/src/camera.rs +++ b/src/camera.rs @@ -46,9 +46,7 @@ impl + From> Iterator for ImageSampler { type Item = Ray; fn next(&mut self) -> Option { - if (self.current_row >= self.image_height_pixels - && self.current_column >= self.image_width_pixels) - { + if self.current_row >= self.image_height_pixels { return None; }