diff options
author | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2025-02-26 18:05:40 +0700 |
---|---|---|
committer | Rosyid Haryadi <rosyid_haryadi@protonmail.com> | 2025-02-26 18:05:40 +0700 |
commit | 7c868a16da77f3aefbf0d33f14dd3d0ded542fc4 (patch) | |
tree | f3ca85602c5109fd014ff03c9ca1fbc80e1343a4 /src/calculus.rs | |
parent | afa026412fad832c85d28ddedb6b4bb74a4042d1 (diff) |
upd: renderer
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)) |