From fd34e9d5b92c54abc69b3c7633733c8b14e2e4b9 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Fri, 15 Apr 2022 09:44:05 +0800 Subject: [PATCH] refactor: use contains --- src/triangle/_impl/_tri_delaunay_impl.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/triangle/_impl/_tri_delaunay_impl.scad b/src/triangle/_impl/_tri_delaunay_impl.scad index 3e2fa7f3..5494e925 100644 --- a/src/triangle/_impl/_tri_delaunay_impl.scad +++ b/src/triangle/_impl/_tri_delaunay_impl.scad @@ -4,7 +4,7 @@ use <../../util/map/hashmap_get.scad>; use <../../util/map/hashmap_del.scad>; use <../../util/map/hashmap_keys.scad>; use <../../util/map/hashmap_put.scad>; -use <../../util/has.scad>; +use <../../util/contains.scad>; use <../../util/find_index.scad>; function ihash(a, b, c) = a * 961 + b * 31 + c; @@ -129,7 +129,7 @@ function _adjustNeighborsDtri(d, newTriangles, leng, _indices_hash, i = 0) = let( neighbors = hashmap_get(delaunay_triangles(d), delaunayTri, hash = _indices_hash), leng_nbrs = len(neighbors), - nbri = find_index(neighbors, function(nbr) nbr != undef && has(nbr, edge[1]) && has(nbr, edge[0])), + nbri = find_index(neighbors, function(nbr) nbr != undef && contains(nbr, edge[1]) && contains(nbr, edge[0])), nd = nbri == -1 ? d : updateNbrs(d, delaunayTri, [ for(j = 0; j < leng_nbrs; j = j + 1) j == nbri ? t : neighbors[j]