Fix usages of std::min and std::max to be windows safe (#4887)

This commit is contained in:
Thad House
2022-12-31 12:00:45 -08:00
committed by GitHub
parent c11bd2720f
commit b632b288a3
6 changed files with 9 additions and 9 deletions

View File

@@ -103,8 +103,8 @@ DifferentialDrive::WheelSpeeds DifferentialDrive::ArcadeDriveIK(
// Find the maximum possible value of (throttle + turn) along the vector that
// the joystick is pointing, then desaturate the wheel speeds
double greaterInput = std::max(std::abs(xSpeed), std::abs(zRotation));
double lesserInput = std::min(std::abs(xSpeed), std::abs(zRotation));
double greaterInput = (std::max)(std::abs(xSpeed), std::abs(zRotation));
double lesserInput = (std::min)(std::abs(xSpeed), std::abs(zRotation));
if (greaterInput == 0.0) {
return {0.0, 0.0};
}