1
0
Fork 0

Fix an off by one problem which is left from a failed attempt to interpolatre between classes

This commit is contained in:
Erik Hofman 2020-11-15 09:31:26 +01:00
parent dd59119570
commit f0b24af3f1

View file

@ -183,11 +183,8 @@ void FGClimate::update(double dt)
double rxs = round(xs);
double ryt = round(yt);
int xoffs = (rxs < xs) ? -1 : 1;
int yoffs = (ryt < yt) ? -1 : 1;
int s = static_cast<int>(rxs + xoffs);
int t = static_cast<int>(ryt + yoffs);
int s = static_cast<int>(rxs);
int t = static_cast<int>(ryt);
color = image->getColor(s, t);
// convert from color shades to koppen-classicfication