ptLineDist

fun ptLineDist(x1: double, y1: double, x2: double, y2: double, px: double, py: double): double

Returns the distance from a point to a line. The distance measured is the distance between the specified point and the closest point on the infinitely-extended line defined by the specified coordinates. If the specified point intersects the line, this method returns 0.0.

Return

a double value that is the distance from the specified point to the specified line.

Since

1.2

Parameters

x1

the X coordinate of the start point of the specified line

y1

the Y coordinate of the start point of the specified line

x2

the X coordinate of the end point of the specified line

y2

the Y coordinate of the end point of the specified line

px

the X coordinate of the specified point being measured against the specified line

py

the Y coordinate of the specified point being measured against the specified line