npm.io
0.0.25 • Published 4 years ago

triangle-area-fast

Licence
CC0-1.0
Version
0.0.25
Deps
0
Size
2 kB
Vulns
0
Weekly
0

triangle-area-fast

quickly get the area of a 3d triangle (using cross-product)

Installation

npm i triangle-area-fast

Usage

var taf = require('triangle-area-fast');

//triangle is 3 pts [x,y,z]
var triangle = [[0,0,1],[1,0,1],[1,1,1]];

var area = taf(triangle);

console.log(area);

//returns area of triangle:
//0.5

See Also

stonks

Keywords