mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-27 18:00:34 +05:00
PLEIADES. fix WrapperIndex(index) for negative index
This commit is contained in:
parent
a104996e30
commit
686d2fa85d
@ -103,7 +103,7 @@ public:
|
||||
* \retval int - valid node index
|
||||
*/
|
||||
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();
|
||||
return ind;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user