(a, b, c)
return (cy - ay) * (bx - ax) > (by - ay) * (cx - ax)
Checks whether three points are listed in a counterclockwise order.
Checks whether three points are listed in a counterclockwise order.
Checks whether three points are listed in a counterclockwise order .
def ccw(a, b, c):
    """
    Checks whether three points are listed in a counterclockwise order.
    """
    ax, ay = (a[:, 0], a[:, 1]) if a.ndim == 2 else (a[0], a[1])
    bx, by = (b[:, 0], b[:, 1]) if b.ndim == 2 else (b[0], b[1])
    cx, cy = (c[:, 0], c[:, 1]) if c.ndim == 2 else (c[0], c[1])
    return (cy - ay) * (bx - ax) > (by - ay) * (cx - ax)
def ccw ( a , b , c ) : ax , ay = ( a [ : , 0 ] , a [ : , 1 ] ) if a . ndim == 2 else ( a [ 0 ] , a [ 1 ] ) bx , by = ( b [ : , 0 ] , b [ : , 1 ] ) if b . ndim == 2 else ( b [ 0 ] , b [ 1 ] ) cx , cy = ( c [ : , 0 ] , c [ : , 1 ] ) if c . ndim == 2 else ( c [ 0 ] , c [ 1 ] ) return ( cy - ay ) * ( bx - ax ) > ( by - ay ) * ( cx - ax )