diff --git a/README.md b/README.md index 548b8bc4..ef1903e5 100644 --- a/README.md +++ b/README.md @@ -149,7 +149,7 @@ These examples incubate dotSCAD and dotSCAD refactors these examples. See [examp - [util/sum](https://openhome.cc/eGossip/OpenSCAD/lib2x-sum.html) - [util/zip](https://openhome.cc/eGossip/OpenSCAD/lib2x-zip.html) - [util/lerp](https://openhome.cc/eGossip/OpenSCAD/lib2x-lerp.html) -- [util/choose](https://openhome.cc/eGossip/OpenSCAD/lib2x-choose.html) +- [util/choose](https://openhome.cc/eGossip/OpenSCAD/lib3x-choose.html) ### Matrix - [matrix/m_cumulate](https://openhome.cc/eGossip/OpenSCAD/lib2x-m_cumulate.html) diff --git a/docs/lib2x-choose.md b/docs/lib3x-choose.md similarity index 100% rename from docs/lib2x-choose.md rename to docs/lib3x-choose.md diff --git a/src/util/choose.scad b/src/util/choose.scad index f85bbe08..939d2cc4 100644 --- a/src/util/choose.scad +++ b/src/util/choose.scad @@ -4,7 +4,7 @@ * @copyright Justin Lin, 2021 * @license https://opensource.org/licenses/lgpl-3.0.html * -* @see https://openhome.cc/eGossip/OpenSCAD/lib2x-choose.html +* @see https://openhome.cc/eGossip/OpenSCAD/lib3x-choose.html * **/ diff --git a/test/test_all.scad b/test/test_all.scad index 6ac9304c..6ae6677f 100644 --- a/test/test_all.scad +++ b/test/test_all.scad @@ -68,6 +68,7 @@ include ; include ; include ; include ; +include ; // Voxel include ; diff --git a/test/util/test_choose.scad b/test/util/test_choose.scad new file mode 100644 index 00000000..081a809d --- /dev/null +++ b/test/util/test_choose.scad @@ -0,0 +1,11 @@ +use ; + +module test_choose() { + echo("==== test_choose ===="); + + lt = [[1, true], [2, true], [3, true], [4, true], [5, true]]; + c = choose(lt); + assert(c[1]); +} + +test_choose(); \ No newline at end of file