# Path: geometry.py
# def other_side_of_point_direction(point1, point2):
#     far_behind_point = sub_2d(point2, point1)
#     direction = element_wise_round(normalize(far_behind_point))
#     return direction
# 
# def other_side_of_point(point1, point2):
#     """
#     returns the point right behind point2 as seen by point1.
#     1 = point1
#     2 = point2
#     r = result
#     ..1..
#     .....
#     .....
#     ...2.
#     ...r.
#     """
#     direction = other_side_of_point_direction(point1, point2)
#     return add_2d(point2, direction)


import unittest
from geometry import other_side_of_point_direction, other_side_of_point


class TestComposition(unittest.TestCase):
    def setUp(self):
        pass

    def test_other_side_of_point_direction_should_return_right_when_target_on_left(self):
        """
        1, 2, r
        .....
        .12r.
        .....
        """
        p1 = (-1, 0)
        p2 = (0, 0)
        expected_r = (1, 0)

# Path: geometry.py
# def other_side_of_point_direction(point1, point2):
#     far_behind_point = sub_2d(point2, point1)
#     direction = element_wise_round(normalize(far_behind_point))
#     return direction
# 
# def other_side_of_point(point1, point2):
#     """
#     returns the point right behind point2 as seen by point1.
#     1 = point1
#     2 = point2
#     r = result
#     ..1..
#     .....
#     .....
#     ...2.
#     ...r.
#     """
#     direction = other_side_of_point_direction(point1, point2)
#     return add_2d(point2, direction)


# Path: geometry_test.py
import unittest
from geometry import other_side_of_point_direction, other_side_of_point



class TestComposition(unittest.TestCase):
    def setUp(self):
        pass

    def test_other_side_of_point_direction_should_return_right_when_target_on_left(self):
        """
        1, 2, r
        .....
        .12r.
        .....
        """
        p1 = (-1, 0)
        p2 = (0, 0)
        expected_r = (1, 0)

        self.assertEqual(other_side_of_point_direction(p1, p2), expected_r)