polygon_signed_area#

madcubapy.utils.polygon_signed_area(vertices)[source]#

Compute the signed area of a polygon.

Positive area indicates counterclockwise vertex order, negative area indicates clockwise order.

Parameters:
verticesndarray of shape (N, 2)

Vertices of the polygon.

Returns:
signed_areafloat

Signed area of the polygon.