summaryrefslogtreecommitdiffstats
path: root/libdimension-python/tests/geometry.py
diff options
context:
space:
mode:
Diffstat (limited to 'libdimension-python/tests/geometry.py')
-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)