# Path: PyDvi/Tools/FuncTools.py
# def middle(a, b):
#     return .5 * (a + b)


from PyDvi.Tools.FuncTools import middle

        """ Is the interval included in i1?
        """

        # print '(%f <= %f and %f <= %f)' % (i2.inf, i1.inf, i1.sup, i2.sup)
        
        return i2.inf <= i1.inf and i1.sup <= i2.sup

    ##############################################

    # Fixme: length -> size ?
  
    def length(self):

        """ Return sup - inf
        """

        return self.sup - self.inf

    ##############################################

    def zero_length(self):

        """ Return sup == inf
        """

        return self.sup == self.inf

    ##############################################


# Path: PyDvi/Tools/FuncTools.py
# def middle(a, b):
#     return .5 * (a + b)


# Path: PyDvi/Tools/Interval.py
from PyDvi.Tools.FuncTools import middle


        """ Is the interval included in i1?
        """

        # print '(%f <= %f and %f <= %f)' % (i2.inf, i1.inf, i1.sup, i2.sup)
        
        return i2.inf <= i1.inf and i1.sup <= i2.sup

    ##############################################

    # Fixme: length -> size ?
  
    def length(self):

        """ Return sup - inf
        """

        return self.sup - self.inf

    ##############################################

    def zero_length(self):

        """ Return sup == inf
        """

        return self.sup == self.inf

    ##############################################


    def middle(self):