示例#1
0
 def test_calc_degrees_north_from_coords_northwest(cls):
     assert calc_degrees_north_from_coords((0, 0), (-5, 5)) == 315
示例#2
0
 def test_calc_degrees_north_from_coords_due_north(cls):
     assert calc_degrees_north_from_coords((0, 0), (-1, 0)) == 0
示例#3
0
 def test_calc_degrees_north_from_coords_southwest(cls):
     assert calc_degrees_north_from_coords((10, 10), (15, 15)) == 225
     assert calc_degrees_north_from_coords((10, 10), (13, 15.196)) == 240
示例#4
0
 def test_calc_degrees_north_from_coords_southeast(cls):
     assert calc_degrees_north_from_coords((0, 0), (3, -5.196)) == 120
     assert calc_degrees_north_from_coords((0, 0), (5, -5)) == 135
     assert calc_degrees_north_from_coords((0, 0), (5.196, -3)) == 150
示例#5
0
 def test_calc_degrees_north_from_coords_northeast(cls):
     assert calc_degrees_north_from_coords((0, 0), (-5.196, -3)) == 30
     assert calc_degrees_north_from_coords((1, 1), (-1, -1)) == 45
     assert calc_degrees_north_from_coords((0, 0), (-3, -5.196)) == 60
示例#6
0
 def test_calc_degrees_north_from_coords_due_west(cls):
     assert calc_degrees_north_from_coords((52, 5), (52, 5.1)) == 270
示例#7
0
 def test_calc_degrees_north_from_coords_due_east(cls):
     assert calc_degrees_north_from_coords((0, 0), (0, -1)) == 90