summaryrefslogtreecommitdiff
path: root/testdata/scad/misc/lookup-tests.scad
blob: c03ec95dae06f8daec1d64055ab5b99e061c354e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
echo(lookup(undef, undef));
echo(lookup(undef, [undef]));
echo(lookup(undef, [[undef]]));
echo(lookup(undef, [[undef, undef]]));
echo(lookup(0, [[0, 0]]));
echo(lookup(0.5, [[0, 0],
                  [1, 1]]));

table = [[-1,  -5],
         [-10, -55],
         [0,    0],
         [1,    3],
         [10,   333]];
indices = [-20,-10,-9.9, -0.5, 0, 0.3, 1.1, 10, 10.1];
for (i=[0:len(indices)-1]) {
  echo(lookup(indices[i], table));
}
contact: Jan Huwald // Impressum