Computes a bounding box from a set of points in any dimension.
var getBounds =var points = -1 1 5 10 -8 13consolevar mesh =console
2d: [ [ -8, 1 ], [ 5, 13 ] ] 3d: [ [ -4.958475, -0.003149, -3.729833 ], [ 4.94885, 9.654748, 3.810639 ] ]
npm i bound-points
var bounds = require('bound-points')(points)
Computes an axis aligned bounding box for a set of points.
pointsis an array of points
Returns A pair of upper and lower bounds for the point set.
(c) 2015 Mikola Lysenko. MIT License