Implement Vec3 + f32
This commit is contained in:
parent
5ca6cc0809
commit
20c79a655b
@ -71,6 +71,18 @@ impl str::FromStr for Vec3 {
|
||||
}
|
||||
}
|
||||
|
||||
impl Add<f32> for Vec3 {
|
||||
type Output = Vec3;
|
||||
|
||||
fn add(self, r: f32) -> Vec3 {
|
||||
Vec3 {
|
||||
x: self.x + r,
|
||||
y: self.y + r,
|
||||
z: self.z + r,
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl Add for Vec3 {
|
||||
type Output = Vec3;
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user