Merge pull request #14704 from JoshuaVandaele/mathutils-23

MathUtil: C++20/23 modernisations
This commit is contained in:
JMC47
2026-11-01 14:59:45 -05:00
committed by GitHub
23 changed files with 136 additions and 68 deletions

View File

@@ -541,7 +541,7 @@ bool evdevDevice::AddNode(std::string devnode, int fd, libevdev* dev)
// evdev resolution is specified in "g"s and deg/s.
// Convert these to m/s/s and rad/s.
constexpr ControlState accel_scale = MathUtil::GRAVITY_ACCELERATION;
constexpr ControlState gyro_scale = MathUtil::TAU / 360;
constexpr ControlState gyro_scale = MathUtil::DegreesToRadians(ControlState{1});
add_motion_inputs(ABS_X, accel_scale);
add_motion_inputs(ABS_RX, gyro_scale);