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 rxs = round(xs);
double ryt = round(yt); double ryt = round(yt);
int xoffs = (rxs < xs) ? -1 : 1; int s = static_cast<int>(rxs);
int yoffs = (ryt < yt) ? -1 : 1; int t = static_cast<int>(ryt);
int s = static_cast<int>(rxs + xoffs);
int t = static_cast<int>(ryt + yoffs);
color = image->getColor(s, t); color = image->getColor(s, t);
// convert from color shades to koppen-classicfication // convert from color shades to koppen-classicfication