@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
34 lines • 886 B
TypeScript
import type { Maybe } from "@thi.ng/api";
import type { MultiFn2O } from "@thi.ng/defmulti";
import type { IShape } from "./api.js";
import type { ReadonlyVec, Vec } from "@thi.ng/vectors";
/**
* Computes closest point to `p` on boundary of given shape. Writes result in
* optionally provided output vector (or creates new one if omitted).
*
* @remarks
* Currently implemented for:
*
* - {@link AABB}
* - {@link Arc}
* - {@link Circle}
* - {@link ComplexPolygon}
* - {@link Cubic}
* - {@link Line}
* - {@link Path}
* - {@link Plane}
* - {@link Points}
* - {@link Points3}
* - {@link Polygon}
* - {@link Polyline}
* - {@link Quad}
* - {@link Quadratic}
* - {@link Rect}
* - {@link Sphere}
*
* @param shape
* @param p
* @param out
*/
export declare const closestPoint: MultiFn2O<IShape, ReadonlyVec, Vec, Maybe<Vec>>;
//# sourceMappingURL=closest-point.d.ts.map