mirror of
https://github.com/JustinSDK/dotSCAD.git
synced 2025-04-14 03:01:58 +02:00
update choose
This commit is contained in:
parent
cc2251c05f
commit
d26d4dfabd
@ -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)
|
||||
|
@ -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
|
||||
*
|
||||
**/
|
||||
|
||||
|
@ -68,6 +68,7 @@ include <util/test_sort.scad>;
|
||||
include <util/test_reverse.scad>;
|
||||
include <util/test_fibseq.scad>;
|
||||
include <util/test_bsearch.scad>;
|
||||
include <util/test_choose.scad>;
|
||||
|
||||
// Voxel
|
||||
include <voxel/test_vx_line.scad>;
|
||||
|
11
test/util/test_choose.scad
Normal file
11
test/util/test_choose.scad
Normal file
@ -0,0 +1,11 @@
|
||||
use <util/choose.scad>;
|
||||
|
||||
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();
|
Loading…
x
Reference in New Issue
Block a user