diff --git a/src/math.rs b/src/math.rs index b787954..bd5837e 100644 --- a/src/math.rs +++ b/src/math.rs @@ -46,14 +46,29 @@ where } } -/* -impl Mul> for f64 { - type Output = Vector3; +impl Mul> for f64 { + type Output = Vector3; - fn mul(self, rhs: Vector3) -> Self::Output { + fn mul(self, rhs: Vector3) -> Self::Output { Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z) } -}*/ +} + +impl Mul> for f32 { + type Output = Vector3; + + fn mul(self, rhs: Vector3) -> Self::Output { + Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z) + } +} + +impl Mul> for i32 { + type Output = Vector3; + + fn mul(self, rhs: Vector3) -> Self::Output { + Vector3::new(self * rhs.x, self * rhs.y, self * rhs.z) + } +} impl Mul for Vector3 where