'A modified shoelace algorithm to determine polygon orientation.
See https://en.wikipedia.org/wiki/Shoelace_formula.'

def _isClockwise(self, coords):

    n = len(coords)
    area = 0.0
    for i in range(n):
        j = ((i + 1) % n)
        area += (coords[i][0] * coords[j][1])
        area -= (coords[j][0] * coords[i][1])
    return (area < 0.0)
