mirror of
https://github.com/wpilibsuite/allwpilib
synced 2026-07-04 03:11:43 +00:00
[wpimath] NormalizeAngle: Make inline, remove unnamed namespace (#2986)
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user