/src/main/java/net/finmath/interpolation/BiLinearInterpolation.java
if ( upperIndexY == lowerIndexY ) { upperIndexY++; }
} int upperIndexY = Math.min(Math.max(indexGreaterOrEqualY, 0), this.y.length-1); final int lowerIndexY = Math.min(Math.max(upperIndexY-1, 0), this.y.length-1); if(upperIndexX == lowerIndexX) { upperIndexX++; } <extra_id_0> final double alphaX = (this.x[upperIndexX]-x)/(this.x[upperIndexX]-this.x[lowerIndexX]); final double alphaY = (this.y[upperIndexY]-y)/(this.y[upperIndexY]-this.y[lowerIndexY]); final double interpolatedValue = alphaX * alphaY * z[lowerIndexX][lowerIndexY] + alphaX * (1.0-alphaY) * z[lowerIndexX][upperIndexY] + (1-alphaX) * alphaY * z[upperIndexX][lowerIndexY] +