Exemplo n.º 1
0
 def test_vector_from_xy_returns_approximately_correct_value_in_tile3(self):
     m = GreyCubeMap(width=1536, height=1024)
     vec = m.vector_from_xy((256, 768))
     self.assertTrue(-0.01 < vec.x < 0.01)
     self.assertGreater(vec.y, 0.99)
     self.assertTrue(-0.01 < vec.z < 0.01)
Exemplo n.º 2
0
 def test_vector_from_xy_returns_approximately_correct_value_in_tile2(self):
     m = GreyCubeMap(width=1536, height=1024)
     vec = m.vector_from_xy((1280, 256))
     self.assertLess(vec.x, -0.99)
     self.assertTrue(-0.01 < vec.y < 0.01, vec.y)
     self.assertTrue(-0.01 < vec.z < 0.01, vec.z)