int[] (float startX, float x) { if (x <= startX) return new int[] {0, 0}; if (x > startX + myWidth) return new int[] {1, 1}; int column = (x <= startX + myWidth / 2) ? 0 : 1; return new int[] {column, 1 - column}; }