SShoalMetric
Product

Product features · Signed polygon area

01

ShoalMetric supports review of oriented vertex sums, where reversing a contour changes the sign and a crossing contour needs an algebraic interpretation.

01

Connection

Base URL, credentials and a reachable server.

02

Selection

A model available through the configured endpoint.

03

Capabilities

Context limits and tool support are determined by the model and server.

Signed polygon area

● ● ●ShoalMetric●
A concrete starting point · Signed polygon area ×
def signed_double_area(points):
    if type(points) not in (list, tuple) or not 3 <= len(points) <= 256:
        raise ValueError("polygon.count")
    for p in points:
        if type(p) not in (list, tuple) or len(p) != 2 or any(type(v) is not int or abs(v) > 10**6 for v in p):
            raise ValueError("polygon.coordinate")
    return sum(a[0]*b[1]-a[1]*b[0] for a,b in zip(points, points[1:]+points[:1]))
✳Return twice the signed polygon area for 3–256 integer vertices with coordinate magnitudes at most 1000000.
✓ ChangesReview before applying ↗
Illustrative workspace
AI coding workspace

Your next change starts here.

Get the Windows app ↗