def get_angle_in_plan_relative_to_hexagon(self):
""""Get the angle of the triangle in the plan relative to the rotation
of the same triangle in the hexagon."""
- return ((self.index + 5) % 6 // 2) * pi * 2 / 3 - pi / 6
+ # The meaning of the formula regarding the index is the following:
+ # - rotate the indices by 1
+ # - group by 2 (because couples of triangles move together in the
+ # plan)
+ # - multiply the group by a rotation factor
+ return pi + pi / 6 + (((self.index + 1) % 6) // 2) * pi * 2 / 3
def get_angle_in_hexagon(self):
"""Get the angle of the triangle in the hexagons.