[wpimath] NormalizeAngle: Make inline, remove unnamed namespace (#2986)

This commit is contained in:
Peter Johnson
2020-12-28 13:00:26 -08:00
committed by GitHub
parent 2aed432b4b
commit 7cca469a12

View File

@@ -9,8 +9,7 @@
#include "Eigen/Core"
namespace frc {
namespace {
double NormalizeAngle(double angle) {
inline double NormalizeAngle(double angle) {
static constexpr double tau = 2 * wpi::math::pi;
angle -= std::floor(angle / tau) * tau;
@@ -19,7 +18,6 @@ double NormalizeAngle(double angle) {
}
return angle;
}
} // namespace
/**
* Subtracts a and b while normalizing the resulting value in the selected row