Fix bug where camera would iterate past bottom of image.
This commit is contained in:
parent
326caf151a
commit
10c8992cf4
|
|
@ -46,9 +46,7 @@ impl<T: RealField + From<u32> + From<f64>> Iterator for ImageSampler<T> {
|
|||
type Item = Ray<T>;
|
||||
|
||||
fn next(&mut self) -> Option<Self::Item> {
|
||||
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;
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue