public CollisionParams checkCollision(MovingObject movingObject, AabbToAabbParameters pointToPlaneParams){
        CollisionParams collisionParams = new CollisionParams(false, movingObject.getCurrentDirection());
        int difference = pointToPlaneParams.getDistance();
        boolean collidedMajorPlane = Math.signum(difference) == -1;
        if(collidedMajorPlane){
            if(pointToPlaneParams.getPlaneCenter().getX() == 0){
                collisionParams.setMaximumMovementY(Math.signum(movingObject.getCurrentDirection().getY()) == 1.0? 
                        movingObject.getCurrentDirection().getY() + difference : movingObject.getCurrentDirection().getY() - difference);
            }else{
                collisionParams.setMaximumMovementX(Math.signum(movingObject.getCurrentDirection().getX()) == 1.0? 
                        movingObject.getCurrentDirection().getX() + difference : movingObject.getCurrentDirection().getX() - difference);
            }
        }
        int minorDifference = pointToPlaneParams.getMinorDistance();
        boolean collidedMinorPlane = Math.signum(minorDifference) == -1;
        if(collidedMinorPlane){
            if(pointToPlaneParams.getMinorPlane().getX() == 0){
                collisionParams.setMaximumMovementY(Math.signum(movingObject.getCurrentDirection().getY()) == 1.0? 
                        movingObject.getCurrentDirection().getY() + minorDifference : movingObject.getCurrentDirection().getY() - minorDifference);
            }else{
                collisionParams.setMaximumMovementX(Math.signum(movingObject.getCurrentDirection().getX()) == 1.0? 
                        movingObject.getCurrentDirection().getX() + minorDifference : movingObject.getCurrentDirection().getX() - minorDifference);    
            }
        }
        collisionParams.setCollided(collidedMajorPlane || collidedMinorPlane);
        return collisionParams;
    }