Exemple #1
0
def test_cartesianToPolar_2():
    theta, radius = transform.cartesianToPolar(1, 0)
    assert round(theta, 6) == 0
    assert round(radius, 6) == 1
Exemple #2
0
def test_cartesianToPolar_3():
    theta, radius = transform.cartesianToPolar(0.707107, 0.707107)
    assert round(theta, 6) == round(np.radians(45), 6)
    assert round(radius, 6) == 1
Exemple #3
0
def test_cartesianToPolar_1():
    theta, radius = transform.cartesianToPolar(0, 1)
    assert round(theta, 6) == round(np.radians(90), 6)
    assert round(radius, 6) == 1