bbox-fns
Version:
Light-weight JavaScript Bounding Box Utility Functions
14 lines (11 loc) • 327 B
JavaScript
/**
* @name bboxSize
* @param {Array} bbox - bounding box in form [xmin, ymin, xmax, ymax]
* @return {bbox} size of the bounding box in form [width, height]
*/
function bboxSize([xmin, ymin, xmax, ymax]) {
return [xmax - xmin, ymax - ymin];
}
module.exports = bboxSize;
module.exports.default = bboxSize;
;