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:
@@ -4,7 +4,7 @@
|
||||
|
||||
#include <units/math.h>
|
||||
#include <units/time.h>
|
||||
#include <wpi/math>
|
||||
#include <wpi/numbers>
|
||||
|
||||
#include "frc/MathUtil.h"
|
||||
#include "frc/controller/HolonomicDriveController.h"
|
||||
@@ -15,7 +15,8 @@
|
||||
EXPECT_LE(units::math::abs(val1 - val2), eps)
|
||||
|
||||
static constexpr units::meter_t kTolerance{1 / 12.0};
|
||||
static constexpr units::radian_t kAngularTolerance{2.0 * wpi::math::pi / 180.0};
|
||||
static constexpr units::radian_t kAngularTolerance{2.0 * wpi::numbers::pi /
|
||||
180.0};
|
||||
|
||||
TEST(HolonomicDriveControllerTest, ReachesReference) {
|
||||
frc::HolonomicDriveController controller{
|
||||
|
||||
Reference in New Issue
Block a user