Exemplo n.º 1
0
    def test_get_radians_half_pi_diff_magnitude(self):
        import numpy as np
        from shapeanalysis.process_data import get_radians

        a = np.asarray((0, 3))
        b = np.asarray((0, 0))
        c = np.asarray((1.7, 0))

        actual = get_radians(a, b, c)
        expected = np.pi / 2
        self.assertEqual(expected, actual)
Exemplo n.º 2
0
    def test_get_radians_half_pi_all_offset(self):
        import numpy as np
        from shapeanalysis.process_data import get_radians

        a = np.asarray((1, 3))
        b = np.asarray((1, 1))
        c = np.asarray((1.7, 1))

        actual = get_radians(a, b, c)
        expected = np.pi / 2
        self.assertEqual(expected, actual)
Exemplo n.º 3
0
    def test_get_radians_pi(self):
        import numpy as np
        from shapeanalysis.process_data import get_radians

        a = np.asarray((0, 1))
        b = np.asarray((0, 0))
        c = np.asarray((0, -1))

        actual = get_radians(a, b, c)
        expected = np.pi
        self.assertEqual(expected, actual)