diff options
author | Julian T <julian@jtle.dk> | 2021-07-31 14:02:52 +0200 |
---|---|---|
committer | Julian T <julian@jtle.dk> | 2021-07-31 14:02:52 +0200 |
commit | cee9bcf4a2c8ffbfe6487f7886b2247eaba1c92c (patch) | |
tree | 7fd405d9a3f6351d6341706fba50a8616d6c3a84 /src/world/shapes/sphere.rs | |
parent | 55044e56304c8484b8ff52f362ab1c66c9c5ca93 (diff) |
Better documentation and cleanup
Diffstat (limited to 'src/world/shapes/sphere.rs')
-rw-r--r-- | src/world/shapes/sphere.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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, + )) } } |