Skip to content
/ pia Public

The area of intersection of a pair of polygons

License

Notifications You must be signed in to change notification settings

smuelpeng/pia

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

pia

Calculate the area of intersection of a pair of polygons each specifed as an array of pairs of floats representing the polygon vertices.

The return value is a float and is accurate to float precision. Degenerate cases are avoided by working in exact arithmetic and "fudging" the exact coordinates to an extent smaller than float precision.

This code is a derived from Norman Hardy's aip.c which can be downoaded here, the modification being to convert the original GCC-specific code to C89, and later to C99. This code compiles with gcc and clang on x86 and amd64 architectures with -O3 -std=c99.

Build Status Coverage Status Coverity

About

The area of intersection of a pair of polygons

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published