ft: 10: metals

This commit is contained in:
djaidjai committed 2026-04-16 14:04:55 +02:00
1 parent e8f84b590b
commit b756cc394a
12 files changed
+199 -41

No files matched your search

+6 -6
View File
@@ -6,17 +6,17 @@ pub struct Ray {
}
impl Ray {
pub fn at(&self, t: f32) -> Vec3 {
self.origin + t * self.dir
}
pub fn new(origin: Vec3, dir: Vec3) -> Ray {
Ray {
pub fn new(origin: Vec3, dir: Vec3) -> Self {
Self {
origin: origin,
dir: dir,
}
}
pub fn at(&self, t: f32) -> Vec3 {
self.origin + t * self.dir
}
pub fn origin(&self) -> &Vec3 {
&self.origin
}
Reference in new issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.