diff --git a/core/src/vector.rs b/core/src/vector.rs index a75053a0..def3f8c0 100644 --- a/core/src/vector.rs +++ b/core/src/vector.rs @@ -43,6 +43,17 @@ where } } +impl std::ops::Mul for Vector +where + T: std::ops::Mul + Copy, +{ + type Output = Self; + + fn mul(self, scale: T) -> Self { + Self::new(self.x * scale, self.y * scale) + } +} + impl Default for Vector where T: Default,