From 0aba533556d386ca9366ea73fc6c8328ff377598 Mon Sep 17 00:00:00 2001 From: Yuri Edward Date: Sun, 24 Oct 2021 20:45:40 +0200 Subject: [PATCH] Added Scale * Vector --- src/geometry/scale_ops.rs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/src/geometry/scale_ops.rs b/src/geometry/scale_ops.rs index df42e9bc..1572018d 100644 --- a/src/geometry/scale_ops.rs +++ b/src/geometry/scale_ops.rs @@ -90,30 +90,30 @@ add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul; self: Scale, right: Scale; #[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; ); -// Point * Vector +// Scale * Vector add_sub_impl!(Mul, mul, ClosedMul; (Const, U1), (Const, U1) -> (Const, U1) const D; for; where; - self: &'a Point, right: &'b SVector, Output = Point; - #[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) }; + self: &'a Scale, right: &'b SVector, Output = SVector; + #[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; 'a, 'b); add_sub_impl!(Mul, mul, ClosedMul; (Const, U1), (Const, U1) -> (Const, U1) const D; for; where; - self: &'a Point, right: SVector, Output = Point; - #[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) }; + self: &'a Scale, right: SVector, Output = SVector; + #[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; 'a); add_sub_impl!(Mul, mul, ClosedMul; (Const, U1), (Const, U1) -> (Const, U1) const D; for; where; - self: Point, right: &'b SVector, Output = Point; - #[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) }; + self: Scale, right: &'b SVector, Output = SVector; + #[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; 'b); add_sub_impl!(Mul, mul, ClosedMul; (Const, U1), (Const, U1) -> (Const, U1) const D; for; where; - self: Point, right: SVector, Output = Point; - #[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) }; ); + self: Scale, right: SVector, Output = SVector; + #[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; );