segment-aabb
v1.0.0
Published
compute the aabb of an n-dimensional line segment
Downloads
12
Maintainers
Readme
segment-aabb
compute the aabb of an n-dimensional line segment
install
npm install segment-aabb
use
var convert = require('segment-aabb');
var start = [10, 10, 5];
var end = [100, -2, 10];
var r = convert(start, end);
console.log(r);
/*
outputs:
[10, -2, 5, 100, 10, 10]
*/
api surface
segmentAABB(start
, end
)
start
- vector in the form of an arrayend
- vector in the form of an array
returns array (e.g in 2d [minX, minY, maxX, maxY]
)