Plane: replace fabs() with labs(), unnecessary int to float conversion

This commit is contained in:
Tom Pittenger 2015-05-08 11:40:55 -07:00 committed by Andrew Tridgell
parent 2e191e5a3d
commit eb2bfcd2d3

View File

@ -565,7 +565,7 @@ static bool verify_loiter_to_alt()
//has target altitude been reached?
if (condition_value != 0) {
if (fabs(condition_value - current_loc.alt) < 500) {
if (labs(condition_value - current_loc.alt) < 500) {
//Only have to reach the altitude once -- that's why I need
//this global condition variable.
//