aboutsummaryrefslogtreecommitdiff
path: root/utils
diff options
context:
space:
mode:
authorHolden Rohrer <hr@hrhr.dev>2020-07-16 13:41:44 -0400
committerHolden Rohrer <hr@hrhr.dev>2020-07-16 13:41:44 -0400
commit246a4582eda90825a6beaaa963c8d3772c6cf8dc (patch)
tree94100377b6f56113d120977674851576dea2464b /utils
parentf26b5af8c272628da9a46d7e4bf79634fb8dbae3 (diff)
measurespace has default [0,0] to give useful answer w/o loc
Diffstat (limited to 'utils')
-rw-r--r--utils/measurespace.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/utils/measurespace.js b/utils/measurespace.js
index 4020926..1cd1fcc 100644
--- a/utils/measurespace.js
+++ b/utils/measurespace.js
@@ -4,6 +4,7 @@ const vec = require('./vec');
module.exports = function(space){
let min = space.loc;
+ if (min.length === 0) min = [0,0];
let data = space.data;
let disp = [data.length, 0];
for (let i = 0; i < data.length; i++){