Пример #1
0
 def test_returns_zero_when_non_normalised_angles_are_equivalent(self):
     self.assertEquals(0, Game.angle_difference(380, -340))
Пример #2
0
 def test_returns_correct_value_when_difference_is_small_negative_but_angles_not_normalised(self):
     self.assertEquals(-20, Game.angle_difference(410, -330))
Пример #3
0
 def test_returns_zero_when_angles_are_the_same(self):
     self.assertEquals(0, Game.angle_difference(45, 45))
Пример #4
0
 def test_returns_correct_value_when_difference_is_negative_and_crosses_wrap(self):
     self.assertEquals(-20, Game.angle_difference(10, 350))
Пример #5
0
 def test_returns_correct_value_when_difference_is_positive_and_crosses_wrap(self):
     self.assertEquals(20, Game.angle_difference(350, 10))
Пример #6
0
 def test_returns_correct_value_when_difference_is_small_negative(self):
     self.assertEquals(-20, Game.angle_difference(50, 30))
Пример #7
0
 def test_returns_correct_value_when_difference_is_small_positive(self):
     self.assertEquals(20, Game.angle_difference(30, 50))
Пример #8
0
 def test_returns_correct_value_when_difference_is_small_positive_but_angles_not_normalised(self):
     self.assertEqual(20, Game.angle_difference(-330, 410))