You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@sis.apache.org by de...@apache.org on 2017/05/02 16:11:09 UTC
svn commit: r1793557 -
/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
Author: desruisseaux
Date: Tue May 2 16:11:09 2017
New Revision: 1793557
URL: http://svn.apache.org/viewvc?rev=1793557&view=rev
Log:
Make Envelope2D consistent with the policy now applied in AbstractEnvelope as a result of https://issues.apache.org/jira/browse/SIS-172 resolution.
Modified:
sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
Modified: sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java
URL: http://svn.apache.org/viewvc/sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java?rev=1793557&r1=1793556&r2=1793557&view=diff
==============================================================================
--- sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java [UTF-8] (original)
+++ sis/branches/JDK8/core/sis-referencing/src/main/java/org/apache/sis/geometry/Envelope2D.java [UTF-8] Tue May 2 16:11:09 2017
@@ -834,9 +834,10 @@ public class Envelope2D extends Rectangl
}
/*
* See AbstractEnvelope.intersects(Envelope) for an illustration of the algorithm applied here.
+ * We use < operator, not <=, for consistency with the standard "intersects" definition.
*/
- final boolean minCondition = (min1 <= min0 + span0);
- final boolean maxCondition = (min1 + span1 >= min0);
+ final boolean minCondition = (min1 < min0 + span0);
+ final boolean maxCondition = (min1 + span1 > min0);
if (maxCondition & minCondition) {
continue;
}