diff --git a/Tree.cpp b/Tree.cpp index 1771f7c..dbc8ec0 100644 --- a/Tree.cpp +++ b/Tree.cpp @@ -1717,13 +1717,13 @@ Tree::FindCell( const Point3d& ptToAssign, const CurveLine& cl, INTVECTOR vCells ptIntersPlus = ptIntersPlus + vtDirDX * EPS_SMALL ; } else if ( (nEdge == 0 || nEdge == 2) && abs(vtDir.y) > EPS_SMALL) - ptIntersPlus.y += Sign( vtDir.y) * EPS_SMALL ; + ptIntersPlus.y += (vtDir.y > 0 ? 1 : -1) * EPS_SMALL ; else if ( ( nEdge == 1 || nEdge == 3 ) && abs(vtDir.y) > 1 - EPS_SMALL ) { Vector3d vtDirDX = vtDir ; vtDirDX.Rotate( Z_AX, -90) ; ptIntersPlus = ptIntersPlus + vtDirDX * EPS_SMALL ; } else if ( (nEdge == 1 || nEdge == 3) && abs(vtDir.x) > EPS_SMALL) - ptIntersPlus.x += Sign( vtDir.x) * EPS_SMALL ; + ptIntersPlus.x += (vtDir.x > 0 ? 1 : -1) * EPS_SMALL ; } // o in un vertice else if ( nEdge == 4 || nEdge == 5 || nEdge == 6 || nEdge == 7) {