Doesn't always return the correct result:
Output
Code:
System.out.println(xy[0] + ":" + xy[1] + ", " + Arrays.toString(item.getBoundingBox()) + ", " + item.isInBounds(xy[0], xy[1]));Code:
242:316, [156, 222, 156, 222], false
242:316, [156, 222, 245, 301], false
242:316, [156, 222, 348, 429], true
242:316, [156, 222, 399, 499], true
242:316, [156, 222, 400, 501], true
242:316, [376, 420, 185, 258], false //should be true 376>242>185 && 420>316>258
242:316, [376, 420, 183, 255], false