protected void checkEdge() {
        
        if ((xmin < containerXMin || getXMax() > containerXMax) && run != 0) {
            run *= -1;
        }
        if ((ymin < 0 || getYMax() > containerYMax) && rise != 0) {
            rise *= -1;
        }
    }