mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
Replace .to<double>() and .template to<double>() with .value() (#3667)
It's a less verbose way to do the same thing.
This commit is contained in:
@@ -20,8 +20,8 @@ TEST(AnalogEncoderSimTest, Basic) {
|
||||
frc::sim::AnalogEncoderSim encoderSim{encoder};
|
||||
|
||||
encoderSim.SetPosition(180_deg);
|
||||
EXPECT_NEAR(encoder.Get().to<double>(), 0.5, 1E-8);
|
||||
EXPECT_NEAR(encoderSim.GetTurns().to<double>(), 0.5, 1E-8);
|
||||
EXPECT_NEAR(encoderSim.GetPosition().Radians().to<double>(), wpi::numbers::pi,
|
||||
EXPECT_NEAR(encoder.Get().value(), 0.5, 1E-8);
|
||||
EXPECT_NEAR(encoderSim.GetTurns().value(), 0.5, 1E-8);
|
||||
EXPECT_NEAR(encoderSim.GetPosition().Radians().value(), wpi::numbers::pi,
|
||||
1E-8);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user