Skip to content

Commit

Permalink
removed string concatenation from interpolation method
Browse files Browse the repository at this point in the history
  • Loading branch information
kevinmilner committed Aug 17, 2023
1 parent e8f8d3d commit aa38281
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -252,8 +252,10 @@ public double get(double x, double y) {
* @throws IllegalArgumentException if x or y is outside of the allowable range
*/
public double bilinearInterpolation(double x, double y) {
Preconditions.checkArgument(x >= minX && x <= maxX, "x value of "+x+" outside valid range of [%s %s]", minX, maxX);
Preconditions.checkArgument(y >= minY && y <= maxY, "y value of "+y+" outside valid range of [%s %s]", minY, maxY);
Preconditions.checkArgument(x >= minX && x <= maxX,
"x value of %s outside valid range of [%s %s]", x, minX, maxX);
Preconditions.checkArgument(y >= minY && y <= maxY,
"y value of %s outside valid range of [%s %s]", x, minY, maxY);

int x0 = getIndexBefore(x, minX, gridSpacingX);
int x1 = x0 + 1;
Expand Down

0 comments on commit aa38281

Please sign in to comment.