def in_left_halfspace2(a, b, p):
    """Returns True is point p is to the left of line a<->b.
       where left is defined as standing at a and facing towards b"""
    return (b[0]-a[0]) * (p[1]-a[1]) - (b[1]-a[1]) * (p[0]-a[0]) <= 0