package dendrarium.trees.svg;

/**
 *
 * @author Tomasz Badowski
 */

public class SubtreePosition {
    private int x1;
    private int x2;
    private int level;
  
    SubtreePosition(int xLeft, int xRight, int actLevel){
        x1 = xLeft;
        x2 = xRight;
        level = actLevel;
    }

    /**
     * @return the x1
     */
    public int getX1() {
        return x1;
    }

    /**
     * @return the x2
     */
    public int getX2() {
        return x2;
    }

    /**
     * @return the level
     */
    public int getLevel() {
        return level;
    }

    public int middle(){
        return (x1 + x2)/2;
    }

}
