1
0
mirror of https://github.com/JustinSDK/dotSCAD.git synced 2025-08-26 07:55:16 +02:00

add zipper param

This commit is contained in:
Justin Lin
2021-02-11 11:45:28 +08:00
parent 387bd8fe4a
commit f6ea7fa328
3 changed files with 12 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
use <util/zip.scad>;
use <util/sum.scad>;
module test_zip() {
echo("==== test_zip ====");
@@ -8,6 +9,9 @@ module test_zip() {
zs = [2.5, 7.5, 12.4];
assert(zip([xs, ys, zs]) == [[10, 5, 2.5], [20, 15, 7.5], [30, 25, 12.4]]);
sum_up = function(elems) sum(elems);
assert(zip([xs, ys, zs], sum_up) == [17.5, 42.5, 67.4]);
}
test_zip();