npm.io
1.0.0 • Published 11 years ago

2d-polygon-area

Licence
MIT
Version
1.0.0
Deps
0
Vulns
0
Weekly
0
Stars
3

2d-polygon-area

compute the area of a 2d polygon

install

npm install 2d-polygon-area

use

var square = [
[0, 0],
[10, 0],
[10, 10],
[0, 10]
].reverse();

console.log(area(square));

// outputs: 100

license

MIT

Keywords