[wpimath] Remove Rotation2d value field (#7490)

It's not part of SO(2).
This commit is contained in:
Tyler Veness
2024-12-06 21:00:09 -08:00
committed by GitHub
parent 38b09a6dfd
commit 144e79a614
6 changed files with 29 additions and 48 deletions

View File

@@ -59,7 +59,7 @@ TEST(Rotation2dTest, Multiply) {
const auto rot = Rotation2d{10_deg};
EXPECT_DOUBLE_EQ(30.0, (rot * 3.0).Degrees().value());
EXPECT_DOUBLE_EQ(410.0, (rot * 41.0).Degrees().value());
EXPECT_DOUBLE_EQ(50.0, (rot * 41.0).Degrees().value());
}
TEST(Rotation2dTest, Equality) {
@@ -90,9 +90,9 @@ TEST(Rotation2dTest, Constexpr) {
constexpr auto subtracted = cartesianCtor - degreeCtor;
static_assert(defaultCtor.Radians() == 0_rad);
static_assert(degreeCtor.Degrees() == 270_deg);
static_assert(negated.Radians() == -5_rad);
static_assert(multiplied.Radians() == 10_rad);
static_assert(degreeCtor.Degrees() == -90_deg);
static_assert(negated.Radians() == -5_rad + 1_tr);
static_assert(multiplied.Radians() == 10_rad - 2_tr);
static_assert(subtracted == rotation45);
static_assert(radianCtor != degreeCtor);
}