Commit 23fb3781 authored by Jan Möbius's avatar Jan Möbius

Extended vector test for operator ==

git-svn-id: http://www.openmesh.org/svnrepo/OpenMesh/trunk@1277 fdac6126-5c0c-442c-9429-916003d36597
parent a7af0a59
......@@ -5,7 +5,7 @@ class VectorTest(unittest.TestCase):
def test_compute_triangle_surface_with_cross_product(self):
# vec1
# x
# y
# |
# |
# |
......@@ -20,6 +20,22 @@ class VectorTest(unittest.TestCase):
area = 0.5 * (vec1 % vec2).norm()
self.assertEqual(area, 0.5)
def test_equality_operator_vec3d(self):
vec1 = openmesh.Vec3d(0.0, 1.0, 0.0)
vec2 = openmesh.Vec3d(1.0, 0.0, 0.0)
vec3 = openmesh.Vec3d(1.0, 0.0, 0.0)
self.assertFalse(vec1==vec2)
self.assertTrue(vec3==vec2)
def test_equality_operator_vec3f(self):
vec1 = openmesh.Vec3f(0.0, 1.0, 0.0)
vec2 = openmesh.Vec3f(1.0, 0.0, 0.0)
vec3 = openmesh.Vec3f(1.0, 0.0, 0.0)
self.assertFalse(vec1==vec2)
self.assertTrue(vec3==vec2)
def test_abs_test(self):
vec1 = openmesh.Vec3d(0.5, 0.5, -0.5)
self.assertEqual(vec1.l8_norm(), 0.5)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment