diff --git a/src/ves/GridLinearInterpolation.cpp b/src/ves/GridLinearInterpolation.cpp index 67b70a0b593c9bb2fc57403ac4f68c32db4cd9e1..dbf72c38d8b46c05972504633c92138f601c0d7f 100644 --- a/src/ves/GridLinearInterpolation.cpp +++ b/src/ves/GridLinearInterpolation.cpp @@ -68,8 +68,8 @@ double GridLinearInterpolation::getGridValueWithLinearInterpolation_2D(Grid* gri i00[0] = i01[0] = unsigned( std::floor( (arg[0]-grid_min[0])/grid_delta[0] ) ); i10[0] = i11[0] = unsigned( std::ceil( (arg[0]-grid_min[0])/grid_delta[0] ) ); - i00[1] = i10[1] = unsigned( std::floor( (arg[1]-grid_min[1])/grid_delta[0] ) ); - i01[1] = i11[1] = unsigned( std::ceil( (arg[1]-grid_min[1])/grid_delta[0] ) ); + i00[1] = i10[1] = unsigned( std::floor( (arg[1]-grid_min[1])/grid_delta[1] ) ); + i01[1] = i11[1] = unsigned( std::ceil( (arg[1]-grid_min[1])/grid_delta[1] ) ); // https://en.wikipedia.org/wiki/Bilinear_interpolation double x = arg[0];