Pre Macro Implementation
This commit is contained in:
parent
1b94f8ca7a
commit
4f762c7df9
25
src/math.rs
25
src/math.rs
@ -46,14 +46,29 @@ where
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/*
|
impl Mul<Vector3<f64>> for f64 {
|
||||||
impl<T> Mul<Vector3<T>> for f64 {
|
type Output = Vector3<f64>;
|
||||||
type Output = Vector3<T>;
|
|
||||||
|
|
||||||
fn mul(self, rhs: Vector3<T>) -> Self::Output {
|
fn mul(self, rhs: Vector3<f64>) -> Self::Output {
|
||||||
Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z)
|
Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z)
|
||||||
}
|
}
|
||||||
}*/
|
}
|
||||||
|
|
||||||
|
impl Mul<Vector3<f32>> for f32 {
|
||||||
|
type Output = Vector3<f32>;
|
||||||
|
|
||||||
|
fn mul(self, rhs: Vector3<f32>) -> Self::Output {
|
||||||
|
Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
impl Mul<Vector3<i32>> for i32 {
|
||||||
|
type Output = Vector3<i32>;
|
||||||
|
|
||||||
|
fn mul(self, rhs: Vector3<i32>) -> Self::Output {
|
||||||
|
Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
impl<T> Mul for Vector3<T>
|
impl<T> Mul for Vector3<T>
|
||||||
where
|
where
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user