Learn R Programming

HistDAWass (version 1.0.8)

ShortestDistance: Shortes distance from a point o a 2d segment

Description

Shortes distance from a point o a 2d segment

Usage

ShortestDistance(p, line)

Value

A numeric value, the Euclidean distance of point p to the line.

Arguments

p

coordinates of a point

line

a 2x2 matrix with the coordinates of two points defining a line

See Also

data2hist function and DouglasPeucker function