This commit is contained in:
Victor Shcherb 2020-05-01 17:41:39 +02:00
parent dde9cf2dbd
commit 3e6733d538

View file

@ -182,11 +182,20 @@ public class MapAlgorithms {
}
}
if (outx == rightX || outx == leftX) {
if (outy >= topY && outy <= bottomY) {
bx = outx;
by = outy;
return combine2Points(bx, by);
}
}
if (outx == rightX || outx == leftX || outy == topY || outy == bottomY) {
bx = outx;
by = outy;
//return (((long) bx) << 32) | ((long) by);
if (outy == topY || outy == bottomY) {
if (leftX <= outx && outx <= rightX) {
bx = outx;
by = outy;
return combine2Points(bx, by);
}
}
return -1L;
}