Fixed bad error check in vp_search, example errors in debug.scad

This commit is contained in:
Adrian Mariano
2021-05-16 19:06:36 -04:00
parent 465cc40c0a
commit b88d05c4db
2 changed files with 2 additions and 2 deletions

View File

@@ -304,7 +304,7 @@ function _vp_search(points, tree, p, r) =
];
function vp_search(points, tree, p, r) =
assert(is_list(tree[1]) && (len(tree[1])==4 || (len(tree[1])==1 && is_list(tree[0]))), "Vantage point tree not valid")
assert(is_list(tree) && (len(tree)==4 || (len(tree)==1 && is_list(tree[0]))), "Vantage point tree not valid")
assert(is_matrix(points), "Parameter points is not a consistent point list")
assert(is_vector(p,len(points[0])), "Query must be a vector whose length matches the point list")
assert(all_positive(r),"Radius r must be a positive number")