Le 02/04/2020 à 05:11, Sergey Bylokhov a écrit :
The idea of the fix looks fine, but probably the new comment in the
"getTileGridXOffset" overkill and we can move it to the test instead.
Thanks, no problem.
I though after, as a matter of principle, the following line in the test:
final int tileX = (x - tileGridXOffset) / image.getTileWidth();
could be replaced by:
final int tileX = Math.floorDiv(x - tileGridXOffset, image.getTileWidth());
and same for Y. It would change nothing for this test since it uses
positive values, but maybe using the formula valid in the general case
is safer in case someone picks it up and uses it in another context.
Martin