diff options
author | Marius Kintel <marius@kintel.net> | 2012-03-31 21:22:33 (GMT) |
---|---|---|
committer | Marius Kintel <marius@kintel.net> | 2012-03-31 21:22:33 (GMT) |
commit | 8766b955ecbf58effe4acb41ae244e1a0ee04360 (patch) | |
tree | 13d6ccfc7ad48ce33762938438516101fd831ac9 | |
parent | a13b9009c68e18fb796fa2660a9372d330f04797 (diff) |
Updated matrix and vector multiplication tests
-rw-r--r-- | testdata/scad/misc/vector-values.scad | 6 | ||||
-rw-r--r-- | tests/regression/echotest/vector-values-expected.txt | 4 |
2 files changed, 5 insertions, 5 deletions
diff --git a/testdata/scad/misc/vector-values.scad b/testdata/scad/misc/vector-values.scad index 1872b39..59c2ee5 100644 --- a/testdata/scad/misc/vector-values.scad +++ b/testdata/scad/misc/vector-values.scad @@ -8,7 +8,7 @@ echo(str("Testing vector dot product: ",c1)); d1=[1,0]; echo(str(" Bounds check: ",a1*d1)); -m2=[[0,1],[1,0]]; +m2=[[0,1],[1,0],[2,3]]; v2=[2,3]; p2=m2*v2; echo(str("Testing matrix * vector: ",p2)); @@ -16,8 +16,8 @@ echo(str("Testing matrix * vector: ",p2)); d2=[0,0,1]; echo(str(" Bounds check: ",m2*d2)); -m3=[[1,-1,1],[1,0,-1]]; -v3=[1,1]; +m3=[[1,-1],[1,0],[2,3]]; +v3=[1,2,3]; p3=v3*m3; echo(str("Testing vector * matrix: ",p3)); diff --git a/tests/regression/echotest/vector-values-expected.txt b/tests/regression/echotest/vector-values-expected.txt index 7654892..78053b9 100644 --- a/tests/regression/echotest/vector-values-expected.txt +++ b/tests/regression/echotest/vector-values-expected.txt @@ -1,8 +1,8 @@ ECHO: "Testing vector dot product: 14" ECHO: " Bounds check: undef" -ECHO: "Testing matrix * vector: [3, 2]" +ECHO: "Testing matrix * vector: [3, 2, 13]" ECHO: " Bounds check: undef" -ECHO: "Testing vector * matrix: [2, -1, 0]" +ECHO: "Testing vector * matrix: [9, 8]" ECHO: " Bounds check: undef" ECHO: "Testing id matrix * id matrix: [[1, 0], [0, 1]]" ECHO: "Testing asymmetric matrix * matrix: [[2, 1], [-1, 0]]" |