Skip to content

tmpvar/segment-aabb

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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 array
  • end - vector in the form of an array

returns array (e.g in 2d [minX, minY, maxX, maxY])

license

MIT

About

compute the aabb of an n-dimensional line segment

Resources

License

Stars

Watchers

Forks

Packages

No packages published