1.0.5 • Published 8 years ago

polygon-overlap v1.0.5

Weekly downloads
427
License
ISC
Repository
github
Last release
8 years ago

polygon-overlap

Check if two polygons overlap

Install

  • npm: npm install polygon-overlap
  • Bower: bower install polygon-overlap

Usage

const p0 = [[0,0], [1,0], [1,1]];
const p1 = [[0.5,0.5], [1.5,0.5], [1.5,1.5]];
assert(overlap(p0, p1)===true);

Tests

mocha

Sources

http://math.stackexchange.com/questions/254569/concave-polygons-overlapping-test