vertices-bounding-box
v1.0.0
Published
Computes the bounding box of a set of vertices
Downloads
127
Maintainers
Readme
vertices-bounding-box
Computes the bounding box of a set of vertices
Works with vertices of arbitrary dimension.
Install
$ npm install vertices-bounding-box
Usage
var boundingBox = require('vertices-bounding-box');
var positions = [
[-1, 0, 0],
[ 1, 0, -1],
[ 0, -1, 0],
[ 0, 1, 1]
];
var bb = boundingBox(positions);
console.log(bb);
/*
[
[ -1, -1, -1 ],
[ 1, 1, 1 ]
]
*/