[wpimath] Make geometry classes constexpr (#7222)

This commit is contained in:
Tyler Veness
2024-10-18 16:08:41 -07:00
committed by GitHub
parent 2054d0f57e
commit 95b9bd880b
30 changed files with 1324 additions and 1114 deletions

View File

@@ -4,14 +4,8 @@
#include "frc/geometry/Rotation2d.h"
#include <cmath>
#include <wpi/json.h>
#include "units/math.h"
using namespace frc;
void frc::to_json(wpi::json& json, const Rotation2d& rotation) {
json = wpi::json{{"radians", rotation.Radians().value()}};
}