mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-06-21 01:01: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:
@@ -8,7 +8,7 @@
|
||||
#include <cmath>
|
||||
|
||||
#include <hal/FRCUsageReporting.h>
|
||||
#include <wpi/math>
|
||||
#include <wpi/numbers>
|
||||
|
||||
#include "frc/SpeedController.h"
|
||||
#include "frc/drive/Vector2d.h"
|
||||
@@ -73,8 +73,8 @@ void MecanumDrive::DrivePolar(double magnitude, double angle,
|
||||
reported = true;
|
||||
}
|
||||
|
||||
DriveCartesian(magnitude * std::cos(angle * (wpi::math::pi / 180.0)),
|
||||
magnitude * std::sin(angle * (wpi::math::pi / 180.0)),
|
||||
DriveCartesian(magnitude * std::cos(angle * (wpi::numbers::pi / 180.0)),
|
||||
magnitude * std::sin(angle * (wpi::numbers::pi / 180.0)),
|
||||
zRotation, 0.0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user