示例#1
0
def test_random_test_case1():
    assert expect_difference_within_error(
        compute_angle((2.312, 2.1312), (-32.1232, 0.3123123)),
        2.3871, 0.0001)
示例#2
0
def test_identical_vector_to_neg():
    assert expect_difference_within_epsolon(
        compute_angle((0.78221, 1.12313231), (-0.78221, -1.12313231)),
        c_PI)
示例#3
0
def test_random_test_case0():
    assert expect_difference_within_error(
        compute_angle((21, 1), (0, 13)),
        1.5232, 0.0001)
示例#4
0
def test_unitXY_to_unitNegXY():
    assert expect_difference_within_epsolon(
        compute_angle((1, 1), (-1, -1)),
        c_PI)
示例#5
0
def test_identical_vector():
    assert expect_difference_within_epsolon(
        compute_angle((0.78221, 1.12313231), (0.78221, 1.12313231)),
        0)
示例#6
0
def test_unitY_to_unitXY():
    assert expect_difference_within_epsolon(
        compute_angle((0, 1), (1, 1)),
        c_PI / 4)
示例#7
0
def test_unitX_to_unitX():
    assert expect_difference_within_epsolon(
        compute_angle((1, 0), (1, 0)),
        0)
示例#8
0
def test_zero_to_zero():
    assert np.isnan(compute_angle((0, 0), (0, 0)))
示例#9
0
def test_random_test_case3():
    assert expect_difference_within_error(
        compute_angle((-9.17734, 7.5648962), (5.134146, -3.652341)),
        3.0705, 0.0001)
示例#10
0
def test_random_test_case2():
    assert expect_difference_within_error(
        compute_angle((1.23123, 7.1312321), (123.123, -4.1231321)),
        1.4333, 0.0001)