Added sphere, circle, cone

This commit is contained in:
STP
2023-11-12 03:47:03 -05:00
parent dfc5d1ad23
commit 9c863dc8bf

View File

@@ -11,7 +11,7 @@ impl Ray {
pub fn new(_a: Point3<f32>, _b: Vector3<f32>) -> Ray { pub fn new(_a: Point3<f32>, _b: Vector3<f32>) -> Ray {
Ray { a: _a, b: _b } Ray { a: _a, b: _b }
} }
pub fn at_t(self, t: f32) -> Point3<f32> { pub fn at_t(&self, t: f32) -> Point3<f32> {
self.a + self.b * t self.a + self.b * t
} }
} }