Home > @jsplumb/util > lineLength
#
lineLength() functionCalculates the length of a line between the two points.
Signature:
export declare function lineLength(p1: PointXY, p2: PointXY): number;
#
ParametersParameter | Type | Description |
---|---|---|
p1 | PointXY | First point in the line |
p2 | PointXY | Second point in the line |
Returns:
number
The length of a line between the two points.