mirror of
https://gitee.com/mirrors_PX4/PX4-Autopilot.git
synced 2026-10-18 05:43:35 +08:00
TrajMath: use fmaxf instead of max
This commit is contained in:
committed by
Mathieu Bresciani
parent
c7bddda1db
commit
af345c88e9
@@ -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"
|
||||
|
||||
Reference in New Issue
Block a user