[tests] cover scale-aware transform
This commit is contained in:
parent
6c42049b23
commit
5596e2b1af
1 changed files with 2 additions and 2 deletions
|
|
@ -64,7 +64,7 @@ def test_apply_transforms() -> None:
|
||||||
t1 = [10, 20, 0, 0]
|
t1 = [10, 20, 0, 0]
|
||||||
t2 = [[5, 0, 0, 0], [0, 5, 0, 0]]
|
t2 = [[5, 0, 0, 0], [0, 5, 0, 0]]
|
||||||
combined = apply_transforms(t1, t2)
|
combined = apply_transforms(t1, t2)
|
||||||
assert_equal(combined, [[15, 20, 0, 0], [10, 25, 0, 0]])
|
assert_equal(combined, [[15, 20, 0, 0, 1], [10, 25, 0, 0, 1]])
|
||||||
|
|
||||||
|
|
||||||
def test_apply_transforms_advanced() -> None:
|
def test_apply_transforms_advanced() -> None:
|
||||||
|
|
@ -80,4 +80,4 @@ def test_apply_transforms_advanced() -> None:
|
||||||
# 1. mirror inner y if outer mirrored: (10, 0) -> (10, 0)
|
# 1. mirror inner y if outer mirrored: (10, 0) -> (10, 0)
|
||||||
# 2. rotate by outer rotation (pi/2): (10, 0) -> (0, 10)
|
# 2. rotate by outer rotation (pi/2): (10, 0) -> (0, 10)
|
||||||
# 3. add outer offset (0, 0) -> (0, 10)
|
# 3. add outer offset (0, 0) -> (0, 10)
|
||||||
assert_allclose(combined[0], [0, 10, pi / 2, 1], atol=1e-10)
|
assert_allclose(combined[0], [0, 10, pi / 2, 1, 1], atol=1e-10)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue