aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--examples/search.js7
1 files changed, 4 insertions, 3 deletions
diff --git a/examples/search.js b/examples/search.js
index 982031c..b35c9b8 100644
--- a/examples/search.js
+++ b/examples/search.js
@@ -4,11 +4,12 @@
const bs = require('binary-search');
const Space = require('../space');
-const comb = require('../utils/comb.js')
-const getdims = require('../utils/getdims.js');
+const comb = require('../utils/comb')
+const getdims = require('../utils/getdims');
+const vec = require('../utils/vec');
function getComp(index){
- return (element,needle) => element[index] - needle[index];
+ return (element,needle) => (element[index] - needle[index] || element[1-index] - needle[1-index])
}
function tileToChar(coord){