mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-14 12:46:00 +08:00
fix scalar - matrix
This commit is contained in:
parent
0158d78906
commit
9f899808d7
@ -245,10 +245,10 @@ operator-(const Scalar& scalar) const
|
||||
return *this + (-scalar);
|
||||
}
|
||||
|
||||
friend inline const CwiseUnaryOp<ei_scalar_add_op<Scalar>, Derived>
|
||||
friend inline const CwiseUnaryOp<ei_scalar_add_op<Scalar>, CwiseUnaryOp<ei_scalar_opposite_op<Scalar>,Derived> >
|
||||
operator-(const Scalar& scalar,const EIGEN_CURRENT_STORAGE_BASE_CLASS<Derived>& other)
|
||||
{
|
||||
return other + (-scalar);
|
||||
return (-other) + scalar;
|
||||
}
|
||||
|
||||
/** Substracts the given \a scalar from each coeff of this expression.
|
||||
|
Loading…
x
Reference in New Issue
Block a user