ft: ran linter

This commit is contained in:
2026-04-29 02:11:41 +02:00
parent e88422cb2f
commit 388fbcbb8a
12 changed files with 80 additions and 63 deletions

View File

@@ -183,7 +183,7 @@ impl Camera {
fn defocus_disk_sample(&self) -> Vec3 {
let p = Vec3::random_in_unit_disk();
return self.look_from + (p.x() * self.defocus_disk_u) + (p.y() * self.defocus_disk_v);
self.look_from + (p.x() * self.defocus_disk_u) + (p.y() * self.defocus_disk_v)
}
pub fn render(&mut self, hittables: &Vec<Arc<dyn Hittable>>) {
@@ -209,7 +209,7 @@ impl Camera {
let ray_orig = if self.defocus_angle > 0. { self.defocus_disk_sample() } else {self.look_from};
let ray_dir = pixel_loc - ray_orig;
let r = Ray::new(ray_orig, ray_dir);
pixel_colour += self.ray_colour(&hittables, &r, self.max_depth);
pixel_colour += self.ray_colour(hittables, &r, self.max_depth);
}
}
@@ -220,7 +220,7 @@ impl Camera {
}
info!("Writing image file...");
imgbuf.save("output.png").unwrap();
imgbuf.save("output2.png").unwrap();
}
fn ray_colour(&self, hittables: &Vec<Arc<dyn Hittable>>, r: &Ray, depth: u32) -> Colour {