TrajMath: use fmaxf instead of max

This commit is contained in:
bresch
2023-03-22 10:03:48 +01:00
committed by Mathieu Bresciani
parent c7bddda1db
commit af345c88e9
+1 -1
View File
@@ -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"