PLEIADES. fix WrapperIndex(index) for negative index

This commit is contained in:
eap 2006-08-03 05:59:03 +00:00
parent a104996e30
commit 686d2fa85d

View File

@ -103,7 +103,7 @@ public:
* \retval int - valid node index * \retval int - valid node index
*/ */
int WrappedIndex(const int ind) const { int WrappedIndex(const int ind) const {
if ( ind < 0 ) return -( ind % NbNodes()); if ( ind < 0 ) return NbNodes() + ind % NbNodes();
if ( ind >= NbNodes() ) return ind % NbNodes(); if ( ind >= NbNodes() ) return ind % NbNodes();
return ind; return ind;
} }