Fix bug where camera would iterate past bottom of image.

This commit is contained in:
Matthew Gordon 2019-11-11 16:48:40 -05:00
parent 326caf151a
commit 10c8992cf4
1 changed files with 1 additions and 3 deletions

View File

@ -46,9 +46,7 @@ impl<T: RealField + From<u32> + From<f64>> Iterator for ImageSampler<T> {
type Item = Ray<T>; type Item = Ray<T>;
fn next(&mut self) -> Option<Self::Item> { fn next(&mut self) -> Option<Self::Item> {
if (self.current_row >= self.image_height_pixels if self.current_row >= self.image_height_pixels {
&& self.current_column >= self.image_width_pixels)
{
return None; return None;
} }