Skip to content
Snippets Groups Projects
Commit 999cb99e authored by David Sehnal's avatar David Sehnal
Browse files

mol-data: fixed bug in isSubsetIS

parent 12b53bc4
No related branches found
No related tags found
No related merge requests found
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
import OrderedSet from '../ordered-set' import OrderedSet from '../ordered-set'
import Interval from '../interval' import Interval from '../interval'
import SortedArray from '../sorted-array'; //import SortedArray from '../sorted-array';
describe('ordered set', () => { describe('ordered set', () => {
function ordSetToArray(set: OrderedSet) { function ordSetToArray(set: OrderedSet) {
......
...@@ -126,7 +126,7 @@ function isSubsetIS(a: I, b: S) { ...@@ -126,7 +126,7 @@ function isSubsetIS(a: I, b: S) {
const minA = I.min(a), maxA = I.max(a); const minA = I.min(a), maxA = I.max(a);
if (maxA - minA + 1 === 0) return false; if (maxA - minA + 1 === 0) return false;
const minB = S.min(b), maxB = S.max(b); 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) { function areRangesIntersecting(a: OrderedSetImpl, b: OrderedSetImpl) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment