def __isLeft(p0,p1,p2):
    """Returns a float indicating if p2 is left or right of line from p0 and p1
        p0,p1,p2: tuples representing point coordinates
        return: float > 0 if p2 is left
                      < 0 if p2 is right
                      = 0 if p2 is on line"""
    p0x = p0[0]
    p0y = p0[1]
    p1x = p1[0]
    p1y = p1[1]
    p2x = p2[0]
    p2y = p2[1]
    return ((p1x-p0x)*(p2y-p0y)-(p2x-p0x)*(p1y-p0y))