Fix numerous nested versus nested_eval shortcomings

This commit is contained in:
Gael Guennebaud
2014-08-01 14:48:22 +02:00
parent fc13b37c55
commit 2a3c3c49a1
4 changed files with 13 additions and 4 deletions

View File

@@ -211,8 +211,13 @@ template<typename OtherDerived>
bool MatrixBase<Derived>::isOrthogonal
(const MatrixBase<OtherDerived>& other, const RealScalar& prec) const
{
#ifndef EIGEN_TEST_EVALUATORS
typename internal::nested<Derived,2>::type nested(derived());
typename internal::nested<OtherDerived,2>::type otherNested(other.derived());
#else
typename internal::nested_eval<Derived,2>::type nested(derived());
typename internal::nested_eval<OtherDerived,2>::type otherNested(other.derived());
#endif
return numext::abs2(nested.dot(otherNested)) <= prec * prec * nested.squaredNorm() * otherNested.squaredNorm();
}