UNPKG

@mlightcad/libredwg-web

Version:

A DWG/DXF JavaScript parser based on libredwg

19 lines 528 B
export class Box2D { min; max; valid; constructor() { this.min = { x: Infinity, y: Infinity }; this.max = { x: -Infinity, y: -Infinity }; this.valid = false; } expandByPoint(point) { this.min.x = Math.min(this.min.x, point.x); this.min.y = Math.min(this.min.y, point.y); this.max.x = Math.max(this.max.x, point.x); this.max.y = Math.max(this.max.y, point.y); this.valid = true; return this; } } //# sourceMappingURL=box2d.js.map