mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-19 00:41:43 +00:00
[wpiutil] Deprecate wpi::math constants in favor of wpi::numbers (#3383)
The constants were moved from std::math to std::numbers before ratification in C++20.
This commit is contained in:
@@ -7,7 +7,7 @@
|
||||
#include <frc/Joystick.h>
|
||||
#include <frc/smartdashboard/SmartDashboard.h>
|
||||
#include <units/length.h>
|
||||
#include <wpi/math>
|
||||
#include <wpi/numbers>
|
||||
|
||||
DriveTrain::DriveTrain() {
|
||||
// Encoders may measure differently in the real world and in
|
||||
@@ -21,9 +21,9 @@ DriveTrain::DriveTrain() {
|
||||
#else
|
||||
// Circumference = diameter * pi. 360 tick simulated encoders.
|
||||
m_leftEncoder.SetDistancePerPulse(units::foot_t{4_in}.to<double>() *
|
||||
wpi::math::pi / 360.0);
|
||||
wpi::numbers::pi / 360.0);
|
||||
m_rightEncoder.SetDistancePerPulse(units::foot_t{4_in}.to<double>() *
|
||||
wpi::math::pi / 360.0);
|
||||
wpi::numbers::pi / 360.0);
|
||||
#endif
|
||||
SetName("DriveTrain");
|
||||
// Let's show everything on the LiveWindow
|
||||
|
||||
Reference in New Issue
Block a user