aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Geometry/AlignedBox.h
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2009-12-04 23:17:14 +0100
committerGravatar Gael Guennebaud <g.gael@free.fr>2009-12-04 23:17:14 +0100
commit8e05f9cfa1538d76a9d3e01e08ba565bd581806a (patch)
treee3ba56b1c37c00ce1da70277e8ef2a86a48c6173 /Eigen/src/Geometry/AlignedBox.h
parent80ebeae48d7b56500d9ebc8abd2789061af145e1 (diff)
add a DenseBase class for MAtrixBase and ArrayBase and more code factorisation
Diffstat (limited to 'Eigen/src/Geometry/AlignedBox.h')
-rw-r--r--Eigen/src/Geometry/AlignedBox.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Eigen/src/Geometry/AlignedBox.h b/Eigen/src/Geometry/AlignedBox.h
index 003ceaad1..707cfeb4f 100644
--- a/Eigen/src/Geometry/AlignedBox.h
+++ b/Eigen/src/Geometry/AlignedBox.h
@@ -67,7 +67,7 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
inline int dim() const { return AmbientDimAtCompileTime==Dynamic ? m_min.size()-1 : AmbientDimAtCompileTime; }
/** \returns true if the box is null, i.e, empty. */
- inline bool isNull() const { return (m_min.array() > m_max).any(); }
+ inline bool isNull() const { return (m_min.array() > m_max.array()).any(); }
/** Makes \c *this a null/empty box. */
inline void setNull()
@@ -90,11 +90,11 @@ EIGEN_MAKE_ALIGNED_OPERATOR_NEW_IF_VECTORIZABLE_FIXED_SIZE(_Scalar,_AmbientDim)
/** \returns true if the point \a p is inside the box \c *this. */
inline bool contains(const VectorType& p) const
- { return (m_min.array()<=p).all() && (p.array()<=m_max).all(); }
+ { return (m_min.array()<=p.array()).all() && (p.array()<=m_max.array()).all(); }
/** \returns true if the box \a b is entirely inside the box \c *this. */
inline bool contains(const AlignedBox& b) const
- { return (m_min.array()<=b.min()).all() && (b.max().array()<=m_max).all(); }
+ { return (m_min.array()<=b.min().array()).all() && (b.max().array()<=m_max.array()).all(); }
/** Extends \c *this such that it contains the point \a p and returns a reference to \c *this. */
inline AlignedBox& extend(const VectorType& p)