1
0
Fork 0

Whups, fixed a simple bug so you can now fly across the lon = +/-180

boundary without any problems.
This commit is contained in:
curt 1999-05-25 11:54:21 +00:00
parent d87e7ef7d7
commit 875ea2c872

View file

@ -97,7 +97,14 @@ FGBucket fgBucketOffset( double dlon, double dlat, int dx, int dy ) {
double span = bucket_span( clat );
// walk dx units in the lon direction
result.set_bucket( dlon + dx * span, clat );
double tmp = dlon + dx * span;
while ( tmp < -180.0 ) {
tmp += 360.0;
}
while ( tmp >= 180.0 ) {
tmp -= 360.0;
}
result.set_bucket( tmp, clat );
return result;
}