Merge "Issue #1355 fix bilinear interpolation for grid cells between -1 and 0" into development

Former-commit-id: 8a28f8e4fc [formerly 14dcf86cab] [formerly 684a1ddfd7 [formerly 8b5edb90f02c7beb3048dfbeb51c6fcb3209295e]]
Former-commit-id: 684a1ddfd7
Former-commit-id: 32ab58f7b3
This commit is contained in:
Richard Peter 2012-11-27 16:18:22 -06:00 committed by Gerrit Code Review
commit e8e5835045

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;