Issue #1355 fix bilinear interpolation for grid cells between -1 and 0

Former-commit-id: bb2094a69d [formerly 6ea390529a24a0a74be227b6d1cd6bdf0de7a27b]
Former-commit-id: 97ebdae978
This commit is contained in:
Ben Steffensmeier 2012-11-27 15:15:57 -06:00
parent 25c47696b9
commit 52c4a1b36e

View file

@ -50,8 +50,8 @@ public class BilinearInterpolation implements Interpolation {
double value = 0.0f;
double missing = 1.0f;
int xi = (int) x;
int yi = (int) y;
int xi = (int) Math.floor(x);
int yi = (int) Math.floor(y);
// Upper left corner
double xWeight = 1 - x + xi;
double yWeight = 1 - y + yi;