Computes the minimum-area oriented bounding rectangle (2D) using the rotating calipers algorithm
import { MBR, Vector2 } from 'min-rect'
const points = [
[0, 0],
[1, 0],
[0, 1],
[1, 1],
].map(([x, y]) => new Vector2(x, y))
const mbr = mbr.fromPoints(points)
console.log(mbr)
/**
* {
* halfSize: Vector2 { x: 0.5, y: 0.5 },
* center: Vector2 { x: 0.5, y: 0.5 },
* rotation: 0
* }
*/