@thi.ng/geom
Version:
Functional, polymorphic API for 2D geometry types & SVG generation
38 lines • 995 B
TypeScript
import type { MultiFn1 } from "@thi.ng/defmulti";
import type { IShape } from "./api.js";
/**
* Returns the arc length / perimeter / circumference of the given shape. For
* groups calls {@link arcLength} for each child and returns the sum of results.
*
* Implemented for:
*
* - {@link Arc}
* - {@link Circle}
* - {@link ComplexPolygon}
* - {@link Cubic}
* - {@link Cubic3}
* - {@link Ellipse}
* - {@link Group} (total sum of child circumferences)
* - {@link Group3} (total sum of child circumferences)
* - {@link Line}
* - {@link Line3}
* - {@link Path}
* - {@link Path3}
* - {@link Polygon}
* - {@link Polygon3}
* - {@link Polyline}
* - {@link Polyline3}
* - {@link Quad}
* - {@link Quad3}
* - {@link Quadratic}
* - {@link Quadratic3}
* - {@link Rect}
* - {@link Triangle}
* - {@link Triangle3}
*
* For all other types the function returns 0.
*
* @param shape
*/
export declare const arcLength: MultiFn1<IShape, number>;
//# sourceMappingURL=arc-length.d.ts.map