Added Scale * Vector
This commit is contained in:
parent
c11e1ffb4d
commit
0aba533556
|
@ -90,30 +90,30 @@ add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul;
|
||||||
self: Scale<T, D>, right: Scale<T, D>;
|
self: Scale<T, D>, right: Scale<T, D>;
|
||||||
#[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; );
|
#[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; );
|
||||||
|
|
||||||
// Point * Vector
|
// Scale * Vector
|
||||||
add_sub_impl!(Mul, mul, ClosedMul;
|
add_sub_impl!(Mul, mul, ClosedMul;
|
||||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||||
const D; for; where;
|
const D; for; where;
|
||||||
self: &'a Point<T, D>, right: &'b SVector<T, D>, Output = Point<T, D>;
|
self: &'a Scale<T, D>, right: &'b SVector<T, D>, Output = SVector<T, D>;
|
||||||
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) };
|
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) };
|
||||||
'a, 'b);
|
'a, 'b);
|
||||||
|
|
||||||
add_sub_impl!(Mul, mul, ClosedMul;
|
add_sub_impl!(Mul, mul, ClosedMul;
|
||||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||||
const D; for; where;
|
const D; for; where;
|
||||||
self: &'a Point<T, D>, right: SVector<T, D>, Output = Point<T, D>;
|
self: &'a Scale<T, D>, right: SVector<T, D>, Output = SVector<T, D>;
|
||||||
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) };
|
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) };
|
||||||
'a);
|
'a);
|
||||||
|
|
||||||
add_sub_impl!(Mul, mul, ClosedMul;
|
add_sub_impl!(Mul, mul, ClosedMul;
|
||||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||||
const D; for; where;
|
const D; for; where;
|
||||||
self: Point<T, D>, right: &'b SVector<T, D>, Output = Point<T, D>;
|
self: Scale<T, D>, right: &'b SVector<T, D>, Output = SVector<T, D>;
|
||||||
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) };
|
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) };
|
||||||
'b);
|
'b);
|
||||||
|
|
||||||
add_sub_impl!(Mul, mul, ClosedMul;
|
add_sub_impl!(Mul, mul, ClosedMul;
|
||||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||||
const D; for; where;
|
const D; for; where;
|
||||||
self: Point<T, D>, right: SVector<T, D>, Output = Point<T, D>;
|
self: Scale<T, D>, right: SVector<T, D>, Output = SVector<T, D>;
|
||||||
#[allow(clippy::suspicious_arithmetic_impl)] { Point::from(self.coords.component_mul(&right)) }; );
|
#[allow(clippy::suspicious_arithmetic_impl)] { SVector::from(self.vector.component_mul(&right)) }; );
|
||||||
|
|
Loading…
Reference in New Issue