本文整理汇总了Python中myrmidon.Game.angle_difference方法的典型用法代码示例。如果您正苦于以下问题:Python Game.angle_difference方法的具体用法?Python Game.angle_difference怎么用?Python Game.angle_difference使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myrmidon.Game
的用法示例。
在下文中一共展示了Game.angle_difference方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_returns_zero_when_non_normalised_angles_are_equivalent
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_zero_when_non_normalised_angles_are_equivalent(self):
self.assertEquals(0, Game.angle_difference(380, -340))
示例2: test_returns_correct_value_when_difference_is_small_negative_but_angles_not_normalised
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_correct_value_when_difference_is_small_negative_but_angles_not_normalised(self):
self.assertEquals(-20, Game.angle_difference(410, -330))
示例3: test_returns_zero_when_angles_are_the_same
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_zero_when_angles_are_the_same(self):
self.assertEquals(0, Game.angle_difference(45, 45))
示例4: test_returns_correct_value_when_difference_is_negative_and_crosses_wrap
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_correct_value_when_difference_is_negative_and_crosses_wrap(self):
self.assertEquals(-20, Game.angle_difference(10, 350))
示例5: test_returns_correct_value_when_difference_is_positive_and_crosses_wrap
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_correct_value_when_difference_is_positive_and_crosses_wrap(self):
self.assertEquals(20, Game.angle_difference(350, 10))
示例6: test_returns_correct_value_when_difference_is_small_negative
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_correct_value_when_difference_is_small_negative(self):
self.assertEquals(-20, Game.angle_difference(50, 30))
示例7: test_returns_correct_value_when_difference_is_small_positive
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_correct_value_when_difference_is_small_positive(self):
self.assertEquals(20, Game.angle_difference(30, 50))
示例8: test_returns_correct_value_when_difference_is_small_positive_but_angles_not_normalised
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import angle_difference [as 别名]
def test_returns_correct_value_when_difference_is_small_positive_but_angles_not_normalised(self):
self.assertEqual(20, Game.angle_difference(-330, 410))