mirror of
https://github.com/PX4/PX4-Autopilot.git
synced 2026-05-22 14:24:21 +08:00
ft altitude: use longerThan to save a sqrt operation
This commit is contained in:
@@ -352,7 +352,7 @@ void FlightTaskManualAltitude::_updateSetpoints()
|
||||
sp = _man_input_filter.getState();
|
||||
_rotateIntoHeadingFrame(sp);
|
||||
|
||||
if (sp.length() > 1.0f) {
|
||||
if (sp.longerThan(1.0f)) {
|
||||
sp.normalize();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user