]> SALOME platform Git repositories - tools/medcoupling.git/commitdiff
Salome HOME
icc porting
authorageay <ageay>
Mon, 28 Mar 2011 15:41:14 +0000 (15:41 +0000)
committerageay <ageay>
Mon, 28 Mar 2011 15:41:14 +0000 (15:41 +0000)
src/INTERP_KERNEL/PolygonAlgorithms.txx

index 0992129922e43df372998a56c7484e3f2f9b481c..4b69884d22f083eda0b4ac0582d5fb84936f8cf1 100644 (file)
@@ -78,17 +78,17 @@ namespace INTERP_KERNEL
             if(fabs(det) > _epsilon) 
               {
                 inv_det = 1/det;
-                t1=(AC[1]*DC[2]-AC[2]*DC[1])*inv_det;
-                t2=(AB[1]*AC[2]-AB[2]*AC[1])*inv_det;
+                t1=(AC[1]*DC[DIM-1]-AC[DIM-1]*DC[1])*inv_det;
+                t2=(AB[1]*AC[DIM-1]-AB[DIM-1]*AC[1])*inv_det;
               }
             else //beware AB and CD may belong to a plane y = constant
               {
-                det = AB[0]*DC[2]-AB[2]*DC[0];
+                det = AB[0]*DC[DIM-1]-AB[DIM-1]*DC[0];
                 if(fabs(det) > _epsilon) 
                   {
                     inv_det = 1/det;
-                    t1=(AC[0]*DC[2]-AC[2]*DC[0])*inv_det;
-                    t2=(AB[0]*AC[2]-AB[2]*AC[0])*inv_det;
+                    t1=(AC[0]*DC[DIM-1]-AC[DIM-1]*DC[0])*inv_det;
+                    t2=(AB[0]*AC[DIM-1]-AB[DIM-1]*AC[0])*inv_det;
                   }
                 else
                   {