We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ebf83e4 commit 328a781Copy full SHA for 328a781
wpimath/src/test/native/cpp/geometry/Rotation2dTest.cpp
@@ -49,6 +49,19 @@ TEST(Rotation2dTest, Minus) {
49
EXPECT_DOUBLE_EQ(40.0, (rot1 - rot2).Degrees().value());
50
}
51
52
+TEST(Rotation2dTest, UnaryMinus) {
53
+ const auto rot = Rotation2d{20_deg};
54
+
55
+ EXPECT_DOUBLE_EQ(-20.0, (-rot).Degrees().value());
56
+}
57
58
+TEST(Rotation2dTest, Multiply) {
59
+ const auto rot = Rotation2d{10_deg};
60
61
+ EXPECT_DOUBLE_EQ(30.0, (rot * 3.0).Degrees().value());
62
+ EXPECT_DOUBLE_EQ(410.0, (rot * 41.0).Degrees().value());
63
64
65
TEST(Rotation2dTest, Equality) {
66
auto rot1 = Rotation2d{43_deg};
67
auto rot2 = Rotation2d{43_deg};
0 commit comments