Skip to content

Documentation / @finchart/tools / distanceToSegment

Function: distanceToSegment() ​

distanceToSegment(point, a, b): number

Defined in: tools/src/geometry.ts:21

The shortest distance from a point to a segment.

Parameters ​

point ​

Point

a ​

Point

b ​

Point

Returns ​

number