mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-23 01:21:42 +00:00
[wpimath] Remove Rotation2d value field (#7490)
It's not part of SO(2).
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
@@ -143,7 +143,7 @@ TEST_F(SwerveDriveKinematicsTest, ResetWheelAngle) {
|
||||
EXPECT_NEAR(flMod.angle.Degrees().value(), 0.0, kEpsilon);
|
||||
EXPECT_NEAR(frMod.angle.Degrees().value(), 90.0, kEpsilon);
|
||||
EXPECT_NEAR(blMod.angle.Degrees().value(), 180.0, kEpsilon);
|
||||
EXPECT_NEAR(brMod.angle.Degrees().value(), 270.0, kEpsilon);
|
||||
EXPECT_NEAR(brMod.angle.Degrees().value(), -90.0, kEpsilon);
|
||||
}
|
||||
|
||||
TEST_F(SwerveDriveKinematicsTest, TurnInPlaceForwardKinematics) {
|
||||
|
||||
Reference in New Issue
Block a user