Implement Vec3/Vec3

This commit is contained in:
Bill Thiede 2023-01-18 20:14:49 -08:00
parent 9e81acfda9
commit 3e9d900f1e

View File

@ -115,6 +115,18 @@ impl Add for Vec3 {
}
}
impl Div<Vec3> for Vec3 {
type Output = Vec3;
fn div(self, r: Vec3) -> Vec3 {
Vec3 {
x: self.x / r.x,
y: self.y / r.y,
z: self.z / r.z,
}
}
}
impl Div<Vec3> for f32 {
type Output = Vec3;