diff options
Diffstat (limited to 'src/calculus.rs')
-rw-r--r-- | src/calculus.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/calculus.rs b/src/calculus.rs index 40caff8..ac33514 100644 --- a/src/calculus.rs +++ b/src/calculus.rs @@ -67,12 +67,12 @@ pub mod calculus { } } - pub struct Ray { - pub origin: Point3, - pub direction: Vec3, + pub struct Ray<'a> { + pub origin: &'a Point3, + pub direction: &'a Vec3, } - impl Ray { + impl<'a> Ray<'a> { pub fn at(&self, t: f32) -> Point3 { // Get parametric location self.origin.add(&self.direction.scalar_mul(t)) |