mirror of
https://git.salome-platform.org/gitpub/modules/smesh.git
synced 2024-12-28 10:20: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
|
* \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;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user