Added convex_hull()

This commit is contained in:
Revar Desmera
2019-04-16 15:34:54 -07:00
parent fde93d9991
commit 96739c3ea0
5 changed files with 556 additions and 25 deletions

View File

@@ -630,6 +630,21 @@ module test_rotate_points3d() {
test_rotate_points3d();
module test_simplify_path()
{
path = [[-20,10],[-10,0],[-5,0],[0,0],[5,0],[10,0], [10,10]];
assert(simplify_path(path) == [[-20,10],[-10,0],[10,0], [10,10]]);
}
test_simplify_path();
module test_simplify_path_indexed()
{
points = [[-20,10],[-10,0],[-5,0],[0,0],[5,0],[10,0], [10,10]];
path = list_range(len(points));
assert(simplify_path_indexed(points, path) == [0,1,5,6]);
}
test_simplify_path_indexed();
// vim: noexpandtab tabstop=4 shiftwidth=4 softtabstop=4 nowrap