[MOAB-dev] r3012 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Jul 15 17:41:52 CDT 2009
Author: kraftche
Date: 2009-07-15 17:41:52 -0500 (Wed, 15 Jul 2009)
New Revision: 3012
Modified:
MOAB/trunk/MBOrientedBoxTreeTool.cpp
Log:
fix numerical overflow
Modified: MOAB/trunk/MBOrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/MBOrientedBoxTreeTool.cpp 2009-07-14 22:10:40 UTC (rev 3011)
+++ MOAB/trunk/MBOrientedBoxTreeTool.cpp 2009-07-15 22:41:52 UTC (rev 3012)
@@ -1224,7 +1224,7 @@
diff = tmp - loc;
dist_sqr = diff % diff;
if (dist_sqr < smallest_dist_sqr) {
- if (dist_sqr < smallest_dist_sqr + tolerance*(tolerance - 2*smallest_dist)) {
+ if (0.5*dist_sqr < 0.5*smallest_dist_sqr + tolerance*(0.5*tolerance - smallest_dist)) {
facets_out.clear();
if (sets_out)
sets_out->clear();
More information about the moab-dev
mailing list