1
0
Fork 0

Replace one more use of isnan()

This commit is contained in:
James Turner 2016-10-26 14:12:26 +02:00
parent 65b51b8d91
commit 94d96c56cd

View file

@ -783,7 +783,7 @@ void GS::update( double dt, const SGGeod & aircraftPosition )
double offset = _targetGlideslope_deg - gsDirect;
if( offset < 0.0 )
offset = _targetGlideslope_deg/2 * sawtooth(2.0*offset/_targetGlideslope_deg);
assert( false == isnan(offset) );
assert( false == SGMisc<double>::isNaN(offset) );
// GS is documented to be 1.4 degrees thick,
// i.e. plus or minus 0.7 degrees from the midline:
_glideslopeOffset_norm = SGMiscd::clip(offset/0.7, -1.0, 1.0);