1
0
Fork 0

Use SGMisc wrapper for _isnan makes "other" OSes happy

This commit is contained in:
Torsten Dreyer 2017-07-07 09:12:16 +02:00
parent 2c8aad12ba
commit 169b0f59e5
2 changed files with 3 additions and 3 deletions

View file

@ -608,7 +608,7 @@ void HighPassFilterImplementation::initialize( double initvalue )
double HighPassFilterImplementation::compute(double dt, double input)
{
if (_isnan(input))
if (SGMiscd::isNaN(input))
SG_LOG(SG_AUTOPILOT, SG_ALERT, "High pass filter output is NaN.");
input = GainFilterImplementation::compute(dt, input);
@ -830,7 +830,7 @@ void DigitalFilter::update( bool firstTime, double dt)
}
double input = _valueInput.get_value() - _referenceInput.get_value();
if (_isnan(input))
if (SGMiscd::isNaN(input))
input = _valueInput.get_value() - _referenceInput.get_value();
double output = _implementation->compute( dt, input );

View file

@ -205,7 +205,7 @@ double InputValue::get_value() const
if( _periodical ) {
value = _periodical->normalize( value );
}
if (_isnan(value))
if (SGMiscd::isNaN(value))
SG_LOG(SG_AUTOPILOT, SG_ALERT, "input is NaN." );
return _abs ? fabs(value) : value;
}