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

Fixes #7429.
This commit is contained in:
Tyler Veness
2024-12-07 15:49:17 -08:00
committed by GitHub
parent f772bb141d
commit e222efaa01
32 changed files with 615 additions and 27 deletions

View File

@@ -307,6 +307,13 @@ TEST(Rotation3dTest, Inequality) {
EXPECT_NE(rot1, rot2);
}
TEST(Rotation3dTest, ToMatrix) {
Rotation3d before{10_deg, 20_deg, 30_deg};
Rotation3d after{before.ToMatrix()};
EXPECT_EQ(before, after);
}
TEST(Rotation3dTest, Interpolate) {
const Eigen::Vector3d xAxis{1.0, 0.0, 0.0};
const Eigen::Vector3d yAxis{0.0, 1.0, 0.0};