diff --git a/src/geometry/scale_ops.rs b/src/geometry/scale_ops.rs index 1572018d..92510b86 100644 --- a/src/geometry/scale_ops.rs +++ b/src/geometry/scale_ops.rs @@ -78,18 +78,6 @@ add_sub_impl!(Mul, mul, ClosedMul; self: Scale, right: Point, Output = Point; #[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.vector.component_mul(&right.coords)) }; ); -// Scale *= Scale -add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; - const D; - self: Scale, right: &'b Scale; - #[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; - 'b); - -add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; - const D; - self: Scale, right: Scale; - #[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; ); - // Scale * Vector add_sub_impl!(Mul, mul, ClosedMul; (Const, U1), (Const, U1) -> (Const, U1) @@ -117,3 +105,21 @@ add_sub_impl!(Mul, mul, ClosedMul; const D; for; where; self: Scale, right: SVector, Output = SVector; #[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; ); + +// Scale *= Scale +add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; + const D; + self: Scale, right: &'b Scale; + #[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; + 'b); + +add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; + const D; + self: Scale, right: Scale; + #[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; ); + +// Scale ×= scalar +add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; + const D; + self: Scale, right: T; + #[allow(clippy::suspicious_op_assign_impl)] { self.vector *= right }; );