@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
12 lines • 452 B
TypeScript
import type { Vec } from "@thi.ng/vectors";
import type { IShape } from "./api.js";
/**
* Attempts to compute the bounding box of given `shape` and if available,
* returns its centroid (or writes it to `out`, if given). Otherwise returns
* `undefined`.
*
* @param shape
* @param out
*/
export declare const centroidOfBounds: (shape: IShape, out?: Vec) => import("@thi.ng/api").Maybe<Vec<number>>;
//# sourceMappingURL=centroid-of-bounds.d.ts.map