Homogeneous vectors could not be accessed with single index.

Added a regression test.
This commit is contained in:
Christoph Hertzberg
2016-06-08 15:35:31 +02:00
parent c21f2cde34
commit 29f5f098cc
2 changed files with 3 additions and 1 deletions

View File

@@ -75,7 +75,7 @@ template<typename MatrixType,int _Direction> class Homogeneous
inline Index rows() const { return m_matrix.rows() + (int(Direction)==Vertical ? 1 : 0); }
inline Index cols() const { return m_matrix.cols() + (int(Direction)==Horizontal ? 1 : 0); }
inline Scalar coeff(Index row, Index col) const
inline Scalar coeff(Index row, Index col=0) const
{
if( (int(Direction)==Vertical && row==m_matrix.rows())
|| (int(Direction)==Horizontal && col==m_matrix.cols()))