Revision: 56646
          http://sourceforge.net/p/brlcad/code/56646
Author:   starseeker
Date:     2013-08-06 21:15:58 +0000 (Tue, 06 Aug 2013)
Log Message:
-----------
Try a few robustness tweaks, but the C++ < sort still isn't happy.

Modified Paths:
--------------
    brlcad/trunk/src/other/libgdiam/gdiam.cpp

Modified: brlcad/trunk/src/other/libgdiam/gdiam.cpp
===================================================================
--- brlcad/trunk/src/other/libgdiam/gdiam.cpp   2013-08-06 20:41:33 UTC (rev 
56645)
+++ brlcad/trunk/src/other/libgdiam/gdiam.cpp   2013-08-06 21:15:58 UTC (rev 
56646)
@@ -1428,15 +1428,15 @@
        int  sgn;
        gdiam_real  len1, len2;
 
-        if  ( a->equal( *b ) )
+        if  ( a->equal_real( *b ) )
             return  false;
         assert( a != NULL );
         assert( b != NULL );
-        if  ( a->equal( base ) ) {
+        if  ( a->equal_real( base ) ) {
             assert( false );
             return  true;
         }
-        if  ( b->equal( base ) ) {
+        if  ( b->equal_real( base ) ) {
             assert( false );
             return  false;
         }
@@ -1452,8 +1452,8 @@
         * Need this to ensure that swapping a and b doesn't result
         * in the same answer (i.e. no way to decide (!(a < b) && (b < a))
         * for the sort) when those conditions are true. */
-       if ((sgn == 0) && (len1 == len2))
-          return  ( ( a->x > b->x )  &&  ( a->y > b->y ) );
+       if ((sgn == 0) && (GDIAM_NEAR_ZERO(len1 - len2)))
+          return  ( ( a->x < b->x ) || (GDIAM_NEAR_ZERO(a->x - b->x) && a->y < 
b->y) );
 
         return (len1 > len2);
     }

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Get 100% visibility into Java/.NET code with AppDynamics Lite!
It's a free troubleshooting tool designed for production.
Get down to code-level detail for bottlenecks, with <2% overhead. 
Download for free and get started troubleshooting in minutes. 
http://pubads.g.doubleclick.net/gampad/clk?id=48897031&iu=/4140/ostg.clktrk
_______________________________________________
BRL-CAD Source Commits mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/brlcad-commits

Reply via email to