fix bug in selectOne and deselectOne

This commit is contained in:
bkmartinjr
2018-05-29 20:34:59 -07:00
parent 67e65e7535
commit eaa4e6c7a4
+2 -2
View File
@@ -140,7 +140,7 @@ class BitArray {
const col = dim >>> 5; const col = dim >>> 5;
const before = this.bitarray[col * this.length + index]; const before = this.bitarray[col * this.length + index];
const after = before | (1 << (dim % 32)); const after = before | (1 << (dim % 32));
this.bitarray[col] = after; this.bitarray[col * this.length + index] = after;
} }
// deselect index on dimension // deselect index on dimension
@@ -149,7 +149,7 @@ class BitArray {
const col = dim >>> 5; const col = dim >>> 5;
const before = this.bitarray[col * this.length + index]; const before = this.bitarray[col * this.length + index];
const after = before & ~(1 << (dim % 32)); const after = before & ~(1 << (dim % 32));
this.bitarray[col] = after; this.bitarray[col * this.length + index] = after;
} }
// select all indices on dimension. // select all indices on dimension.