예제 #1
0
def test_angle_to_ortho():
    a = Wire(1, 0, 0.5)
    b = Wire(0, 1, 0.5)
    assert a.angle_to(b) == approx(0.5 * np.pi)
예제 #2
0
def test_angle_to():
    a = Wire(-1, 0, 0.5)
    b = Wire(1, 0, 0.5)
    assert a.angle_to(b) == approx(-np.pi)
    assert b.angle_to(a) == approx(np.pi)