ft: ran linter

This commit is contained in:
djaidjai committed 2026-04-29 02:11:41 +02:00
1 parent e88422cb2f
commit 388fbcbb8a
12 files changed
+80 -63

No files matched your search

+3 -3
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 {
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.