From cee9bcf4a2c8ffbfe6487f7886b2247eaba1c92c Mon Sep 17 00:00:00 2001 From: Julian T Date: Sat, 31 Jul 2021 14:02:52 +0200 Subject: Better documentation and cleanup --- src/world/shapes/sphere.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/world/shapes') diff --git a/src/world/shapes/sphere.rs b/src/world/shapes/sphere.rs index e3348de..9ecedd6 100644 --- a/src/world/shapes/sphere.rs +++ b/src/world/shapes/sphere.rs @@ -42,12 +42,12 @@ impl Hittable for Sphere { return None } let w = ray.at(distance); - Some(Intersection { - n: self.norm_at(&w), - p: w, - t: distance, - m: None, - }) + Some(Intersection::new( + self.norm_at(&w), + w, + ray, + distance, + )) } } -- cgit v1.2.3