summaryrefslogtreecommitdiffstats
path: root/libdimension-python/tests
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@gmail.com>2011-05-19 22:59:29 -0600
committerTavian Barnes <tavianator@gmail.com>2011-05-19 22:59:29 -0600
commitf4053866258e48dd98136142471ecabf6c138160 (patch)
tree5d472c9b0072dc7e493882f41f548b113b0c624d /libdimension-python/tests
parent05ffbe15e92140617e90fe0ccbc22cc1fe0ac3e3 (diff)
downloaddimension-f4053866258e48dd98136142471ecabf6c138160.tar.xz
Add matricies to Python module.
Diffstat (limited to 'libdimension-python/tests')
-rwxr-xr-xlibdimension-python/tests/geometry.py13
1 files changed, 13 insertions, 0 deletions
diff --git a/libdimension-python/tests/geometry.py b/libdimension-python/tests/geometry.py
index b398a1b..8f76ef7 100755
--- a/libdimension-python/tests/geometry.py
+++ b/libdimension-python/tests/geometry.py
@@ -50,3 +50,16 @@ assert dot(v, v) == v.norm()**2, dot(v, v)
assert v, bool(v)
assert not Zero, not Zero
assert proj(v, X) == 2*X, proj(v, X)
+
+assert scale(1, 2, 3) == Matrix(1, 0, 0, 0,
+ 0, 2, 0, 0,
+ 0, 0, 3, 0), \
+ scale(1, 2, 3)
+assert translate(x = 1, y = 2, z = 3) == Matrix(1, 0, 0, 1,
+ 0, 1, 0, 2,
+ 0, 0, 1, 3), \
+ translate(x = 1, y = 2, z = 3)
+assert rotate(90*Y) == Matrix( 0, 0, 1, 0,
+ 0, 1, 0, 0,
+ -1, 0, 0, 0), \
+ rotate(90*Y)