def SignedArea(polygon, points):
    """Return the area of the polgon, positive if CCW, negative if CW.

    Args:
      polygon: list of vertex indices
      points: Points
    Returns:
      float - area of polygon, positive if it was CCW, else negative
    """

    a = 0.0
    n = len(polygon)
    for i in range(0, n):
        u = points.pos[polygon[i]]
        v = points.pos[polygon[(i + 1) % n]]
        a += u[0] * v[1] - u[1] * v[0]
    return 0.5 * a