[wpimath] Add affine transformation constructors and getters to geometry API (#7509)

Fixes #7429.
This commit is contained in:
Tyler Veness
2024-12-07 21:29:02 -08:00
committed by GitHub
parent c81bd0c909
commit 62a6a77bbf
32 changed files with 611 additions and 27 deletions

View File

@@ -78,6 +78,13 @@ TEST(Rotation2dTest, Inequality) {
EXPECT_NE(rot1, rot2);
}
TEST(Rotation2dTest, ToMatrix) {
Rotation2d before{20_deg};
Rotation2d after{before.ToMatrix()};
EXPECT_EQ(before, after);
}
TEST(Rotation2dTest, Constexpr) {
constexpr Rotation2d defaultCtor;
constexpr Rotation2d radianCtor{5_rad};