Code

do not return empty intersections any longer
authormental <mental@users.sourceforge.net>
Fri, 9 Mar 2007 03:57:40 +0000 (03:57 +0000)
committermental <mental@users.sourceforge.net>
Fri, 9 Mar 2007 03:57:40 +0000 (03:57 +0000)
src/libnr/nr-rect.cpp

index 848d9b4f9900689b79ff86c39707d7090122d18d..fd291218b781b425152bdba39f6599b11ab1104a 100644 (file)
@@ -293,7 +293,7 @@ Maybe<Rect> intersection(Maybe<Rect const &> a, Maybe<Rect const &> b) {
         for ( int i=0 ; i < 2 ; i++ ) {
             r._min[i] = std::max(a->_min[i], b->_min[i]);
             r._max[i] = std::min(a->_max[i], b->_max[i]);
-            if ( r._min[i] > r._max[i] ) {
+            if ( r._min[i] >= r._max[i] ) {
                return Nothing();
             }
        }