mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-20 00:51:42 +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:
@@ -14,7 +14,7 @@
|
||||
#include <units/time.h>
|
||||
#include <units/velocity.h>
|
||||
#include <units/voltage.h>
|
||||
#include <wpi/math>
|
||||
#include <wpi/numbers>
|
||||
|
||||
class SwerveModule {
|
||||
public:
|
||||
@@ -29,9 +29,9 @@ class SwerveModule {
|
||||
static constexpr int kEncoderResolution = 4096;
|
||||
|
||||
static constexpr auto kModuleMaxAngularVelocity =
|
||||
wpi::math::pi * 1_rad_per_s; // radians per second
|
||||
wpi::numbers::pi * 1_rad_per_s; // radians per second
|
||||
static constexpr auto kModuleMaxAngularAcceleration =
|
||||
wpi::math::pi * 2_rad_per_s / 1_s; // radians per second^2
|
||||
wpi::numbers::pi * 2_rad_per_s / 1_s; // radians per second^2
|
||||
|
||||
frc::PWMSparkMax m_driveMotor;
|
||||
frc::PWMSparkMax m_turningMotor;
|
||||
|
||||
Reference in New Issue
Block a user