raytracing-rs

https://raytracing.github.io in Rust

git clone https://code.pdelong.com/raytracing-rs.git

 1use super::NormalizedVec3;
 2use super::vec3::Point;
 3
 4#[derive(Debug, Copy, Clone)]
 5pub struct Ray {
 6    pub orig: Point,
 7    pub dir: NormalizedVec3,
 8}
 9
10impl Ray {
11    pub fn at(self, t: f64) -> Point {
12        self.orig + self.dir.get() * t
13    }
14}