Skip to content

Commit

Permalink
Ray
Browse files Browse the repository at this point in the history
  • Loading branch information
ChristopherBiscardi committed Aug 26, 2023
1 parent f410e3f commit e769d0e
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions src/main.rs
Expand Up @@ -37,3 +37,14 @@ fn main() -> io::Result<()> {
)?;
Ok(())
}

struct Ray {
origin: DVec3,
direction: DVec3,
}

impl Ray {
fn at(&self, t: f64) -> DVec3 {
self.origin + t * self.direction
}
}

0 comments on commit e769d0e

Please sign in to comment.