mirror of https://github.com/ArduPilot/ardupilot
AC_WPNav: get_closest_point_on_circle uses is_positive
This commit is contained in:
parent
951ff473c3
commit
9185b82b7a
|
@ -240,7 +240,7 @@ bool AC_Circle::update(float climb_rate_cms)
|
||||||
void AC_Circle::get_closest_point_on_circle(Vector3f &result) const
|
void AC_Circle::get_closest_point_on_circle(Vector3f &result) const
|
||||||
{
|
{
|
||||||
// return center if radius is zero
|
// return center if radius is zero
|
||||||
if (_radius <= 0) {
|
if (!is_positive(_radius)) {
|
||||||
result = _center.tofloat();
|
result = _center.tofloat();
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue