code: public int indexOf(float x, float y) {
      	for (int i=0;i<points.length;i+=2) {
      		if ((points[i] == x) && (points[i+1] == y)) {
      			return i / 2;
      		}
      	}
      	
      	return -1;
      }
docs: Get the index of a given point
  
  @param x The x coordinate of the point
  @param y The y coordinate of the point
  @return The index of the point or -1 if the point is not part of this shape path