Skip to content

charton API


charton API / @chart-on/core / index / distToSegment

Function: distToSegment() ​

distToSegment(p, a, b): number

Defined in: packages/core/src/drawing/geometry.ts:8

Distance from p to the nearest point of the segment from a to b.

Parameters ​

p ​

Point

a ​

Point

b ​

Point

Returns ​

number