[py] Add wpimath/geometry tests (#8460)

This commit is contained in:
PJ Reiniger
2026-01-02 12:10:02 -05:00
committed by GitHub
parent 32fa124166
commit 8518b7014c
16 changed files with 2004 additions and 1 deletions

View File

@@ -57,6 +57,13 @@ def test_unary_minus() -> None:
assert math.isclose(-20.0, (-rot).degrees())
def test_multiply():
rot = Rotation2d.fromDegrees(10)
assert (rot * 3.0).degrees() == pytest.approx(30.0)
assert (rot * 41.0).degrees() == pytest.approx(50.0)
def test_equality() -> None:
rot1 = Rotation2d.fromDegrees(43.0)
rot2 = Rotation2d.fromDegrees(43.0)