diff --git a/src/matrix.rs b/src/matrix.rs index ca6d3ea..4355630 100644 --- a/src/matrix.rs +++ b/src/matrix.rs @@ -510,6 +510,13 @@ impl Mul for Matrix2 { fn mul(self, other: Matrix2) -> Matrix2 { self.mul_m(&other) } } +impl Mul for Matrix2 { + type Output = Matrix2; + + #[inline] + fn mul(self, other: S) -> Matrix2 { self.mul_s(other) } +} + impl Mul for Matrix3 { type Output = Matrix3; @@ -517,6 +524,13 @@ impl Mul for Matrix3 { fn mul(self, other: Matrix3) -> Matrix3 { self.mul_m(&other) } } +impl Mul for Matrix3 { + type Output = Matrix3; + + #[inline] + fn mul(self, other: S) -> Matrix3 { self.mul_s(other) } +} + impl Mul for Matrix4 { type Output = Matrix4; @@ -524,6 +538,13 @@ impl Mul for Matrix4 { fn mul(self, other: Matrix4) -> Matrix4 { self.mul_m(&other) } } +impl Mul for Matrix4 { + type Output = Matrix4; + + #[inline] + fn mul(self, other: S) -> Matrix4 { self.mul_s(other) } +} + impl One for Matrix2 { #[inline] fn one() -> Matrix2 { Matrix2::identity() }