private boolean inSection(double x, double x1, double x2, double y, double y1, double y2){
        if (Math.abs(x1 - x2) > 0.1) {
            return (((x >= x1) && (x <= x2)) || ((x <= x1) && (x >= x2)));
        }else {
            return (((y >= y1) && (y <= y2)) || ((y <= y1) && (y >= y2)));
        }
    }