[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:
Tyler Veness
2021-05-26 00:09:36 -07:00
committed by GitHub
parent 393bf23c0c
commit a238cec12b
73 changed files with 322 additions and 284 deletions

View File

@@ -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{