Added scale * scalar + Cleanup scale_ops
This commit is contained in:
parent
865ac001d3
commit
1341801c56
|
@ -36,34 +36,19 @@ add_sub_impl!(Mul, mul, ClosedMul;
|
|||
self: Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector.component_mul(&right.vector)) }; );
|
||||
|
||||
// Scale ÷ Scale
|
||||
// TODO: instead of calling inverse explicitly, could we just add a `mul_tr` or `mul_inv` method?
|
||||
/*add_sub_impl!(Div, div, ClosedSub;
|
||||
// Scale × scalar
|
||||
add_sub_impl!(Mul, mul, ClosedMul;
|
||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||
const D; for; where;
|
||||
self: &'a Scale<T, D>, right: &'b Scale<T, D>, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { todo!(); };
|
||||
'a, 'b);
|
||||
|
||||
add_sub_impl!(Div, div, ClosedSub;
|
||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||
const D; for; where;
|
||||
self: &'a Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { todo!(); };
|
||||
self: &'a Scale<T, D>, right: T, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(&self.vector * right) };
|
||||
'a);
|
||||
|
||||
add_sub_impl!(Div, div, ClosedSub;
|
||||
add_sub_impl!(Mul, mul, ClosedMul;
|
||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||
const D; for; where;
|
||||
self: Scale<T, D>, right: &'b Scale<T, D>, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { todo!(); };
|
||||
'b);
|
||||
|
||||
add_sub_impl!(Div, div, ClosedSub;
|
||||
(Const<D>, U1), (Const<D>, U1) -> (Const<D>, U1)
|
||||
const D; for; where;
|
||||
self: Scale<T, D>, right: Scale<T, D>, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { todo!(); }; );*/
|
||||
self: Scale<T, D>, right: T, Output = Scale<T, D>;
|
||||
#[allow(clippy::suspicious_arithmetic_impl)] { Scale::from(self.vector * right) }; );
|
||||
|
||||
// Scale × Point
|
||||
// TODO: we don't handle properly non-zero origins here. Do we want this to be the intended
|
||||
|
@ -106,14 +91,3 @@ add_sub_assign_impl!(MulAssign, mul_assign, ClosedMul;
|
|||
const D;
|
||||
self: Scale<T, D>, right: Scale<T, D>;
|
||||
#[allow(clippy::suspicious_op_assign_impl)] { self.vector.component_mul_assign(&right.vector); }; );
|
||||
|
||||
/*add_sub_assign_impl!(DivAssign, div_assign, ClosedSub;
|
||||
const D;
|
||||
self: Scale<T, D>, right: &'b Scale<T, D>;
|
||||
#[allow(clippy::suspicious_op_assign_impl)] { todo!(); };
|
||||
'b);
|
||||
|
||||
add_sub_assign_impl!(DivAssign, div_assign, ClosedSub;
|
||||
const D;
|
||||
self: Scale<T, D>, right: Scale<T, D>;
|
||||
#[allow(clippy::suspicious_op_assign_impl)] { todo!(); }; );*/
|
||||
|
|
Loading…
Reference in New Issue