interp3d icon indicating copy to clipboard operation
interp3d copied to clipboard

out of bounds check too strict

Open joasiee opened this issue 2 years ago • 1 comments

Shouldnt the out of bounds check be inclusive of the maximum indices?

So

if x0 >= 0 and y0 >= 0 and z0 >= 0 and x1 <= X and y1 <= Y and z1 <= Z:

instead of

if x0 >= 0 and y0 >= 0 and z0 >= 0 and x1 < X and y1 < Y and z1 < Z

?

joasiee avatar Sep 10 '22 12:09 joasiee

No.

In an array with N elements they are indexed from 0 to N-1.

So it is correct to have boundary >=0 and <N

BigEmperor26 avatar Jul 09 '23 12:07 BigEmperor26