Beispiel #1
0
def test_tupl_reflect_slanted():
    v = Vector(0, -1, 0)
    n = Vector(sqrt(2) / 2, sqrt(2) / 2, 0)
    r = v.reflect(n)
    assert r == Vector(1, 0, 0)
Beispiel #2
0
def test_tupl_reflect_flat():
    v = Vector(1, -1, 0)
    n = Vector(0, 1, 0)
    r = v.reflect(n)
    assert r == Vector(1, 1, 0)