[MOAB-dev] r3053 - MOAB/trunk
kraftche at mcs.anl.gov
kraftche at mcs.anl.gov
Wed Jul 15 12:13:01 CDT 2009
Author: kraftche
Date: 2009-07-15 12:13:01 -0500 (Wed, 15 Jul 2009)
New Revision: 3053
Modified:
MOAB/trunk/MBOrientedBoxTreeTool.cpp
Log:
fix numerical overflow
Modified: MOAB/trunk/MBOrientedBoxTreeTool.cpp
===================================================================
--- MOAB/trunk/MBOrientedBoxTreeTool.cpp 2009-07-10 22:19:37 UTC (rev 3052)
+++ MOAB/trunk/MBOrientedBoxTreeTool.cpp 2009-07-15 17:13:01 UTC (rev 3053)
@@ -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