Connection
Base URL, credentials and a reachable server.
ShoalMetric supports review of oriented vertex sums, where reversing a contour changes the sign and a crossing contour needs an algebraic interpretation.
Base URL, credentials and a reachable server.
A model available through the configured endpoint.
Context limits and tool support are determined by the model and server.
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]))