Browse Source

mol-data: fixed bug in isSubsetIS

David Sehnal 5 years ago
parent
commit
999cb99eb8

+ 1 - 1
src/mol-data/int/_spec/ordered-set.spec.ts

@@ -6,7 +6,7 @@
 
 import OrderedSet from '../ordered-set'
 import Interval from '../interval'
-import SortedArray from '../sorted-array';
+//import SortedArray from '../sorted-array';
 
 describe('ordered set', () => {
     function ordSetToArray(set: OrderedSet) {

+ 1 - 1
src/mol-data/int/impl/ordered-set.ts

@@ -126,7 +126,7 @@ function isSubsetIS(a: I, b: S) {
     const minA = I.min(a), maxA = I.max(a);
     if (maxA - minA + 1 === 0) return false;
     const minB = S.min(b), maxB = S.max(b);
-    return minB >= minA && maxA <= maxB;
+    return minB >= minA && maxB <= maxA;
 }
 
 function areRangesIntersecting(a: OrderedSetImpl, b: OrderedSetImpl) {