0022885: Bugfix: else clause applies to the wrong if statement because of missing...
[occt.git] / src / Bnd / Bnd_Box2d.cxx
index fd33203..694703d 100755 (executable)
@@ -204,14 +204,16 @@ void Bnd_Box2d::Add (const gp_Dir2d& D)
 {
   Standard_Real DX = D.X();
   Standard_Real DY = D.Y();
-  if (DX < 0)
-    if (DX < - gp::Resolution()) OpenXmin();
-  else
-    if (DX >   gp::Resolution()) OpenXmax();
-  if (DY < 0)
-    if (DY < - gp::Resolution()) OpenYmin();
-  else
-    if (DY >   gp::Resolution()) OpenYmax();
+
+  if (DX < -RealEpsilon()) 
+    OpenXmin();
+  else if (DX > RealEpsilon()) 
+    OpenXmax();
+
+  if (DY < -RealEpsilon())
+    OpenYmin();
+  else if (DY > RealEpsilon())
+    OpenYmax();
 }
 
 //=======================================================================