Home > @jsplumbtoolkit/browser-ui > normal
normal() function
Calculates the gradient of a normal to a line between the two points.
Signature:
export declare function normal(p1: PointXY, p2: PointXY): number;
Parameters
Parameter | Type | Description |
---|---|---|
p1 | PointXY | First point in the line |
p2 | PointXY | Second point in the line |
Returns:
number
The gradient of a normal to a line between the two points.