From af345c88e9b182b846b0b1246b1990732ed9feef Mon Sep 17 00:00:00 2001 From: bresch Date: Wed, 1 Mar 2023 15:06:29 +0100 Subject: [PATCH] TrajMath: use fmaxf instead of max --- src/lib/mathlib/math/TrajMath.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/lib/mathlib/math/TrajMath.hpp b/src/lib/mathlib/math/TrajMath.hpp index 959b454692..f26a3406eb 100644 --- a/src/lib/mathlib/math/TrajMath.hpp +++ b/src/lib/mathlib/math/TrajMath.hpp @@ -67,7 +67,7 @@ inline float computeMaxSpeedFromDistance(const float jerk, const float accel, co float max_speed = 0.5f * (-b + sqrtf(sqr(b) - 4.0f * c)); // don't slow down more than the end speed, even if the conservative accel ramp time requests it - return max(max_speed, final_speed); + return fmaxf(max_speed, final_speed); } /* Compute the maximum tangential speed in a circle defined by two line segments of length "d"