Skip to main content

Home > @jsplumbtoolkit/browser-ui > lineLength

lineLength() function

Calculates the length of a line between the two points.

Signature:

export declare function lineLength(p1: PointXY, p2: PointXY): number;

Parameters

ParameterTypeDescription
p1PointXYFirst point in the line
p2PointXYSecond point in the line

Returns:

number

The length of a line between the two points.