本文整理汇总了Python中myrmidon.Game.near_angle方法的典型用法代码示例。如果您正苦于以下问题:Python Game.near_angle方法的具体用法?Python Game.near_angle怎么用?Python Game.near_angle使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类myrmidon.Game
的用法示例。
在下文中一共展示了Game.near_angle方法的8个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: test_returns_incremented_angle_when_given_non_normalised_angles
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_incremented_angle_when_given_non_normalised_angles(self):
self.assertEquals(50, Game.near_angle(-320, 420, 10))
示例2: test_returns_target_angle_when_segment_closer_than_increment_in_neg_direction
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_target_angle_when_segment_closer_than_increment_in_neg_direction(self):
self.assertEquals(30, Game.near_angle(45, 30, 20, 5))
示例3: test_returns_same_angle_when_within_target_segment
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_same_angle_when_within_target_segment(self):
self.assertEquals(45, Game.near_angle(45, 30, 10, 20))
示例4: test_returns_incremented_angle_when_segment_further_away_than_increment_in_neg_direction
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_incremented_angle_when_segment_further_away_than_increment_in_neg_direction(self):
self.assertEquals(110, Game.near_angle(120, 15, 10, 20))
示例5: test_returns_incremented_angle_when_segment_further_away_than_increment_in_pos_direction
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_incremented_angle_when_segment_further_away_than_increment_in_pos_direction(self):
self.assertEquals(55, Game.near_angle(45, 135, 10, 20))
示例6: test_returns_target_angle_when_at_target_angle
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_target_angle_when_at_target_angle(self):
self.assertEquals(135, Game.near_angle(135, 135, 10))
示例7: test_returns_target_angle_when_closer_than_increment_in_negative_direction
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_target_angle_when_closer_than_increment_in_negative_direction(self):
self.assertEquals(135, Game.near_angle(140, 135, 10))
示例8: test_returns_incremented_angle_when_further_away_than_increment_in_negative_direction
# 需要导入模块: from myrmidon import Game [as 别名]
# 或者: from myrmidon.Game import near_angle [as 别名]
def test_returns_incremented_angle_when_further_away_than_increment_in_negative_direction(self):
self.assertEquals(35, Game.near_angle(45, 15, 10))