ft altitude: use longerThan to save a sqrt operation

This commit is contained in:
bresch
2021-09-23 11:22:52 +02:00
committed by Daniel Agar
parent 394fa953b8
commit 2213343240
@@ -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();
}