Ejemplo n.º 1
0
 def test__volume__when_parallel__then_zero(self):
     # when
     result = Vector3D.volume(Vector3D(3.0, 3.0, 3.0),
                              Vector3D(-8.0, -8.0, -8.0),
                              Vector3D(2.0, -2.0, 2.0))
     # then
     assert_that(result).is_close_to(0.0, self.OFFSET)
Ejemplo n.º 2
0
 def test__volume__when_orthogonal__then_zero(self):
     # when
     result = Vector3D.volume(Vector3D(3.0, 3.0, 3.0),
                              Vector3D(1.0, 0.0, 1.0),
                              Vector3D(0.0, -2.0, 0.0))
     # then
     assert_that(result).is_close_to(0.0, self.OFFSET)
Ejemplo n.º 3
0
 def test__volume__then_scalar_triple_product(self):
     # when
     result = Vector3D.volume(Vector3D(1.5, -4.0, -3.5),
                              Vector3D(9.0, -2.5, 8.5),
                              Vector3D(1.0, -1.0, 1.0))
     # then
     assert_that(result).is_close_to(33.75, self.OFFSET)