MCPcopy Create free account
hub / github.com/UVA-Computer-Vision-Lab/FrameINO / polygon_area

Function polygon_area

preprocess/scoring_img.py:31–38  ·  view source on GitHub ↗
(coordinates)

Source from the content-addressed store, hash-verified

29
30
31def polygon_area(coordinates):
32 n = len(coordinates)
33 area = 0
34 for i in range(n):
35 j = (i + 1) % n
36 area += coordinates[i][0] * coordinates[j][1]
37 area -= coordinates[j][0] * coordinates[i][1]
38 return abs(area) / 2
39
40
41

Callers 1

single_processFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected