Documentation
    Preparing search index...

    Interface PathClosestPoint

    The answer to a Path.closestPoint query (§51 "closest-point query").

    interface PathClosestPoint {
        distance: number;
        point: Point2D;
        t: number;
    }
    Index
    distance: number

    Distance from the queried point to PathClosestPoint.point.

    The only same-runtime number in this record: the choice of point compares squared distances and is cross-platform, the square root that reports it is not (see this module's determinism section).

    point: Point2D

    The closest point found on the flattened path.

    t: number

    Normalized arc-length position of PathClosestPoint.point along the path, 0 … 1 — the same parameter Path.pointAt takes.