/** * Finds which bin has that value. * * @param x The x value to search for * @param y The y value to search for * @return The bin, in array indexing format, which holds that x-y value */ public int findBin(double x, double y) { int bx = xAxis.getBin(x); int by = yAxis.getBin(y); if (this.isValidBins(bx, by)) { return (offset.getArrayIndex(bx, by)); } return -1; }