finite is deprecated, use C99 isfinite as recommended.
SG_NORMALIZE_RANGE(calc_bearing, 0.0, 360.0);
}
- if (finite(calc_bearing)) {
+ if (std::isfinite(calc_bearing)) {
double hdg_error = calc_bearing - tgt_heading;
if (fabs(hdg_error) > 0.01) {
TurnTo( calc_bearing );
// now revise the required course for the next way point
_course = getCourse(pos.getLatitudeDeg(), pos.getLongitudeDeg(), curr->getLatitude(), curr->getLongitude());
- if (finite(_course))
+ if (std::isfinite(_course))
TurnTo(_course);
else
SG_LOG(SG_AI, SG_ALERT, "AIShip: Bearing or Range is not a finite number");